rabbah commented on a change in pull request #191: Handle namespace API listing 
on the client.
URL: 
https://github.com/apache/incubator-openwhisk-cli/pull/191#discussion_r160841873
 
 

 ##########
 File path: commands/namespace.go
 ##########
 @@ -61,50 +61,35 @@ var namespaceListCmd = &cobra.Command{
 }
 
 var namespaceGetCmd = &cobra.Command{
-    Use:   "get [NAMESPACE]",
-    Short: wski18n.T("get triggers, actions, and rules in the registry for a 
namespace"),
+    Use:   "get",
+    Short: wski18n.T("get triggers, actions, and rules in the registry for 
namespace"),
     SilenceUsage:   true,
     SilenceErrors:  true,
     PreRunE: SetupClientConfig,
     RunE: func(cmd *cobra.Command, args []string) error {
-        var qualifiedName = new(QualifiedName)
         var err error
+        var namespace string = getClientNamespace()
 
-        if whiskErr := CheckArgs(args, 0, 1, "Namespace get",
-                wski18n.T("An optional namespace is the only valid 
argument.")); whiskErr != nil {
-            return whiskErr
-        }
-
-        // Namespace argument is optional; defaults to configured property 
namespace
-        if len(args) == 1 {
-            if qualifiedName, err = NewQualifiedName(args[0]); err != nil {
-                return NewQualifiedNameError(args[0], err)
-            }
-
-            if len(qualifiedName.GetEntityName()) > 0 {
-                return entityNameError(qualifiedName.GetEntityName())
+        if (!(len(args) == 1 && args[0] == "/_")) {
 
 Review comment:
   there is, the CLI tests already do this: `wsk namespace get /_` (that's how 
I found it).
   I have to add support for `/_` because there's a circular dependence between 
this repo and the main repo and can't break it otherwise.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to