Skip to content

Commit

Permalink
Merge pull request #1 from geomacy/code-grant-process
Browse files Browse the repository at this point in the history
Merge code from brooklyncentral/brooklyn-cli for code grant process
  • Loading branch information
ahgittin committed Feb 29, 2016
2 parents 9d1f2c1 + 2614d4d commit 8fccde0
Show file tree
Hide file tree
Showing 167 changed files with 7,558 additions and 400 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -198,4 +198,4 @@ Apache License
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
27 changes: 22 additions & 5 deletions README.md
@@ -1,7 +1,7 @@

# [![**Brooklyn**](https://brooklyn.apache.org/style/img/apache-brooklyn-logo-244px-wide.png)](http://brooklyn.apache.org/)

### Apache Brooklyn Client CLI Sub-Project
### Apache Brooklyn Client CLI

A command line client for [Apache Brooklyn](https://brooklyn.apache.org).

Expand All @@ -22,7 +22,7 @@ Optional:
to a suitable location for your Go code.
- Install Brooklyn CLI and dependencies (note the "-d" parameter, which instructs Go to download the files but not
build the code).
`go get -d github.com/brooklyncentral/brooklyn-cli/br`
`go get -d github.com/apache/brooklyn-client/br`


## A note on dependency management
Expand All @@ -41,7 +41,7 @@ As Go dependendencies for godep are held in the main package directory ("br"), y
using godep:

```bash
cd $GOPATH/src/github.com/brooklyncentral/brooklyn-cli/br
cd $GOPATH/src/github.com/apache/brooklyn-client/br
godep go install
```
This will build the "br" executable into $GOPATH/bin
Expand All @@ -50,12 +50,12 @@ This will build the "br" executable into $GOPATH/bin

To use the latest published versions of the dependencies simply use
```bash
go get github.com/brooklyncentral/brooklyn-cli/br
go get github.com/apache/brooklyn-client/br
```

When the code is ready to be committed, first update the saved dependencies with
```bash
cd $GOPATH/src/github.com/brooklyncentral/brooklyn-cli/br
cd $GOPATH/src/github.com/apache/brooklyn-client/br
godep save
```

Expand Down Expand Up @@ -146,3 +146,20 @@ And for help on individual commands:
- *help*


----
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
22 changes: 20 additions & 2 deletions api/access_control/access_control.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package access_control

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

func Access(network *net.Network) (models.AccessSummary, error) {
Expand Down
22 changes: 20 additions & 2 deletions api/activities/activities.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package activities

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

func Activity(network *net.Network, activity string) (models.TaskSummary, error) {
Expand Down
18 changes: 18 additions & 0 deletions api/apidoc/apidoc.go
@@ -0,0 +1,18 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
24 changes: 21 additions & 3 deletions api/application/applications.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package application

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

//WIP
Expand Down Expand Up @@ -77,7 +95,7 @@ func DescendantsSensor(network *net.Network, app, sensor string) (string, error)
}

func Tree(network *net.Network) ([]models.Tree, error) {
url := "/v1/applications/tree"
url := "/v1/applications/fetch"
var tree []models.Tree
body, err := network.SendGetRequest(url)
if err != nil {
Expand Down
22 changes: 20 additions & 2 deletions api/catalog/catalog.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package catalog

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

func Icon(network *net.Network, itemId string) ([]byte, error) {
Expand Down
22 changes: 20 additions & 2 deletions api/entities/entities.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package entities

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
"net/url"
)

Expand Down
22 changes: 20 additions & 2 deletions api/entity_config/config.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package entity_config

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

func ConfigValue(network *net.Network, application, entity, config string) (interface{}, error) {
Expand Down
22 changes: 20 additions & 2 deletions api/entity_effectors/effectors.go
@@ -1,12 +1,30 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package entity_effectors

import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
"net/url"
"strconv"
"strings"
Expand Down
22 changes: 20 additions & 2 deletions api/entity_policies/policies.go
@@ -1,11 +1,29 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package entity_policies

import (
"bytes"
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
"net/url"
"strconv"
)
Expand Down
22 changes: 20 additions & 2 deletions api/entity_policy_config/config.go
@@ -1,10 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package entity_policy_config

import (
"encoding/json"
"fmt"
"github.com/brooklyncentral/brooklyn-cli/models"
"github.com/brooklyncentral/brooklyn-cli/net"
"github.com/apache/brooklyn-client/models"
"github.com/apache/brooklyn-client/net"
)

func CurrentState(network *net.Network, application, entity, policy string) (string, error) {
Expand Down

0 comments on commit 8fccde0

Please sign in to comment.