Skip to content

Commit 7a47d49

Browse files
reverse change
1 parent fa763ed commit 7a47d49

File tree

5 files changed

+20
-35
lines changed

5 files changed

+20
-35
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ dependencies {
5353
build(['name':'github.com/mitchellh/go-homedir', 'version':'1111e456ffea841564ac0fa5f69c26ef44dafec9', 'transitive':false])
5454
build(['name':'github.com/nicksnyder/go-i18n/i18n/...', 'version':'991e81cc94f6c54209edb3192cb98e3995ad71c1', 'transitive':false])
5555
build(['name':'github.com/spf13/cobra', 'version':'1238ba19d24b0b9ceee2094e1cb31947d45c3e86', 'transitive':false])
56-
build(['name':'github.com/spf13/pflag', 'version':'81378bbcd8a1005f72b1e8d7579e5dd7b2d612ab', 'transitive':false])
56+
build(['name':'github.com/spf13/pflag', 'version':'367864438f1b1a3c7db4da06a2f55b144e6784e0', 'transitive':false])
5757
build(['name':'golang.org/x/sys/unix', 'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false])
5858
build(['name':'gopkg.in/yaml.v2', 'version':'eb3733d160e74a9c7e442f435eb3bea458e1d19f', 'transitive':false])
5959
build(['name':'github.com/ghodss/yaml', 'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false])
60-
build(['name':'github.com/apache/openwhisk-client-go/whisk','version':'44551f1f3b715e87c0319b55762d50c71d214460','transitive':false])
60+
build(['name':'github.com/apache/openwhisk-client-go/whisk','version':'d8ccb1442651beee6a9245913e3ca0cb182888b1','transitive':false])
6161
build(['name':'github.com/apache/openwhisk-wskdeploy','version':'cbe7c52d99c1ead5172946d3aeb33adb5d5c40b2','transitive':false])
6262
// END - Imported from Godeps
6363
test name:'github.com/stretchr/testify', version:'b91bfb9ebec76498946beb6af7c0230c7cc7ba6c', transitive:false //, tag: 'v1.2.0'

commands/action.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,6 @@ func parseAction(cmd *cobra.Command, args []string, update bool) (*whisk.Action,
480480
return nil, noArtifactError()
481481
}
482482

483-
if update {
484-
action.DelAnnotations = Flags.action.delAnnotation
485-
}
486483
whisk.Debug(whisk.DbgInfo, "Parsed action struct: %#v\n", action)
487484
return action, err
488485
}
@@ -576,13 +573,7 @@ func augmentWebSecureArg(cmd *cobra.Command, args []string, originalAction *whis
576573
augmentedAction.Annotations = augmentedAction.Annotations.AppendKeyValueArr(getWebSecureAnnotations(existingAction))
577574
}
578575
}
579-
// when "--web-secure false", need to delete require-whisk-auth annotation
580-
secureSecret := webSecureSecret(Flags.action.websecure) // will be false when "--web-secure false"
581-
existingSecret := augmentedAction.Annotations.GetValue(WEB_SECURE_ANNOT)
582-
_, disableSecurity := secureSecret.(bool)
583-
if existingSecret != nil && disableSecurity {
584-
augmentedAction.DelAnnotations = []string{"require-whisk-auth"}
585-
}
576+
586577
augmentedAction.Annotations = updateWebSecureAnnotation(Flags.action.websecure, augmentedAction.Annotations)
587578
}
588579

@@ -1315,7 +1306,6 @@ func init() {
13151306
actionUpdateCmd.Flags().StringVarP(&Flags.common.paramFile, "param-file", "P", "", wski18n.T("`FILE` containing parameter values in JSON format"))
13161307
actionUpdateCmd.Flags().StringVar(&Flags.action.web, WEB_FLAG, "", wski18n.T("treat ACTION as a web action, a raw HTTP web action, or as a standard action; yes | true = web action, raw = raw HTTP web action, no | false = standard action"))
13171308
actionUpdateCmd.Flags().StringVar(&Flags.action.websecure, WEB_SECURE_FLAG, "", wski18n.T("secure the web action. where `SECRET` is true, false, or any string. Only valid when the ACTION is a web action"))
1318-
actionUpdateCmd.Flags().StringArrayVar(&Flags.action.delAnnotation, "del-annotation", []string{}, wski18n.T("the list of annotations to be deleted from the action, e.g. --del-annotation key1 --del-annotation key2"))
13191309

13201310
actionInvokeCmd.Flags().StringSliceVarP(&Flags.common.param, "param", "p", []string{}, wski18n.T("parameter values in `KEY VALUE` format"))
13211311
actionInvokeCmd.Flags().StringVarP(&Flags.common.paramFile, "param-file", "P", "", wski18n.T("`FILE` containing parameter values in JSON format"))

commands/flags.go

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,23 +136,22 @@ type FlagsStruct struct {
136136
}
137137

138138
type ActionFlags struct {
139-
docker string
140-
native bool
141-
copy bool
142-
web string
143-
websecure string
144-
sequence bool
145-
timeout int
146-
memory int
147-
logsize int
148-
concurrency int
149-
result bool
150-
kind string
151-
main string
152-
url bool
153-
save bool
154-
saveAs string
155-
delAnnotation []string
139+
docker string
140+
native bool
141+
copy bool
142+
web string
143+
websecure string
144+
sequence bool
145+
timeout int
146+
memory int
147+
logsize int
148+
concurrency int
149+
result bool
150+
kind string
151+
main string
152+
url bool
153+
save bool
154+
saveAs string
156155
}
157156

158157
func IsVerbose() bool {

tests/src/test/scala/org/apache/openwhisk/core/cli/test/WskCliBasicUsageTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ class WskCliBasicUsageTests extends TestHelpers with WskTestHelpers {
669669
Parameters(createKey, createValue) ++
670670
Parameters(origKey, origValue)
671671
}
672-
val updateAnnotations = createAnnotations ++ Parameters(updateKey, updateValue) ++ Parameters(
672+
val updateAnnotations = baseAnnotations ++ Parameters(updateKey, updateValue) ++ Parameters(
673673
origKey,
674674
overwrittenValue)
675675

wski18n/resources/en_US.all.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,10 +1415,6 @@
14151415
"id": "secure the web action. where `SECRET` is true, false, or any string. Only valid when the ACTION is a web action",
14161416
"translation": "secure the web action. where `SECRET` is true, false, or any string. Only valid when the ACTION is a web action"
14171417
},
1418-
{
1419-
"id": "the list of annotations to be deleted from the action, e.g. --del-annotation key1 --del-annotation key2",
1420-
"translation": "the list of annotations to be deleted from the action, e.g. --del-annotation key1 --del-annotation key2"
1421-
},
14221418
{
14231419
"id": "The --web-secure option is only valid when the --web option is enabled.",
14241420
"translation": "The --web-secure option is only valid when the --web option is enabled."

0 commit comments

Comments
 (0)