brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <...@git.apache.org>
Subject [GitHub] brooklyn-client pull request #54: Fixed setting config. Added setting sensor...
Date Wed, 14 Jun 2017 10:58:17 GMT
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-client/pull/54#discussion_r121902650
  
    --- Diff: cli/commands/set.go ---
    @@ -51,9 +53,28 @@ func (cmd *SetConfig) Run(scope scope.Scope, c *cli.Context) {
     	if err := net.VerifyLoginURL(cmd.network); err != nil {
     		error_handler.ErrorExit(err)
     	}
    -	response, err := entity_config.SetConfig(cmd.network, scope.Application, scope.Entity,
scope.Config, c.Args().First())
    -	if nil != err {
    -		error_handler.ErrorExit(err)
    +	
    +	config := scope.Config
    +	sensor := scope.Sensor
    +	if config != "" && sensor != "" {
    +		error_handler.ErrorExit(errors.New("Both config and sensor supplied when calling set.
Please only specify one."))
    +	}
    +	
    +	if config == "" && sensor == "" {
    +		error_handler.ErrorExit(errors.New("Please specify either config or scope when calling
set."))
    --- End diff --
    
    "config or sensor"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message