datawire / datawire-cli

Datawire Cloud tools and utilities
1 stars 0 forks source link

-q appears to be a no op for all CLI calls #41

Open janicedatawire opened 8 years ago

janicedatawire commented 8 years ago

As far as I can tell -q has no affect on CLI calls. Here are some calls with and without the flag; you can see the response is identical in all cases:

$ dwc -q create-org --test jmk9 jmk9 jmk9@example.org
Password for jmk9@example.org @ jmk9: 
Again: 
Now logged in as [S6WBXA37SD]jmk9@example.org

$ dwc create-org --test jmk9 jmk9 jmk9@example.org
Password for jmk9@example.org @ jmk9: 
Again: 
failure: The user already exists.
$ dwc -q invite-user jmk14@example.org 
Inviting jmk14@example.org to QNWKGX97G2...
Success! Send them:

dwc accept-invitation 'FJ8UFS2GNKAZPVK8R5LBRU63JSNR5YCDE6M5VXU0'

$ dwc invite-user jmk15@example.org
Inviting jmk15@example.org to QNWKGX97G2...
Success! Send them:

dwc accept-invitation 'XG8H9A8BH8SVPHSDCHAN6M2SMYEDAY2ZMPH3T1M1'
$ dwc -q accept-invitation 'FJ8UFS2GNKAZPVK8R5LBRU63JSNR5YCDE6M5VXU0'
Full Name: jmk14
Password: 
Again: 
Accepting invitation...
Now logged in as [QNWKGX97G2]jmk14@example.org

$ dwc accept-invitation 'TY142Y2BTY6MUMPL13T83U1287R2PLV6BNRESWJK'
Full Name: jmk16
Password: 
Again: 
Accepting invitation...
Now logged in as [QNWKGX97G2]jmk16@example.org
$ dwc -q status
Logged in as [QNWKGX97G2]jmk16@example.org:

Capabilities:
- dw:admin0: Organization administator
- dw:reqSvc0: Able to request service tokens
- dw:user0: User

No services defined

$ dwc status
Logged in as [QNWKGX97G2]jmk16@example.org:

Capabilities:
- dw:admin0: Organization administator
- dw:reqSvc0: Able to request service tokens
- dw:user0: User

No services defined
$ dwc -q create-service service1
Creating service service1 in QNWKGX97G2...
...created!
svc_token = '<token>'

$ dwc create-service service2
Creating service service2 in QNWKGX97G2...
...created!
svc_token = '<token>'
$ dwc -q service-token service1
svc_token = '<token>'

$ dwc service-token service1
svc_token = '<token>'

Further, -q is supposed to take precedence over -v but if I specify both I get the -v behavior:

$ dwc -v -q create-service service3
NOT VERIFYING TOKENS!
Setting up to use Cloud Registrar at https://identity.datawire.io
Creating service service3 in QNWKGX97G2...
...created!
svc_token = '<token>'

$ dwc -v create-service service4
NOT VERIFYING TOKENS!
Setting up to use Cloud Registrar at https://identity.datawire.io
Creating service service4 in QNWKGX97G2...
...created!
svc_token = '<token>'

$ dwc -q create-service service5
Creating service service5 in QNWKGX97G2...
...created!
svc_token = '<token>'