Skip to content
Browse files

renamed apikey => hub_apikey (consistency with other cli code)

  • Loading branch information...
1 parent e62e69c commit 122cb81a3a22b4ee7ebac5bb10e424a4d44dfbae @lirazsiri lirazsiri committed Aug 3, 2011
View
16 cmd_destroy_workers.py
@@ -15,7 +15,7 @@
Options:
- --apikey Hub APIKEY
+ --hub-apikey Hub APIKEY
Environment: HUB_APIKEY
Return codes:
@@ -50,24 +50,24 @@ def fatal(e):
sys.exit(1)
def main():
- apikey = os.environ.get('HUB_APIKEY', os.environ.get('CLOUDTASK_APIKEY'))
+ hub_apikey = os.environ.get('HUB_APIKEY', os.environ.get('CLOUDTASK_HUB_APIKEY'))
try:
opts, args = getopt.getopt(sys.argv[1:],
'h', [ 'help',
- 'apikey=' ])
+ 'hub-apikey=' ])
except getopt.GetoptError, e:
usage(e)
for opt, val in opts:
if opt in ('-h', '--help'):
usage()
- if opt == '--apikey':
- apikey = val
+ if opt == '--hub-apikey':
+ hub_apikey = val
- if not apikey:
- fatal("missing required APIKEY")
+ if not hub_apikey:
+ fatal("missing required HUB_APIKEY")
if not len(args) == 1:
usage()
@@ -83,7 +83,7 @@ def main():
print "no workers to destroy"
return
- destroyed = Hub(apikey).destroy(*addresses)
+ destroyed = Hub(hub_apikey).destroy(*addresses)
if not destroyed:
fatal("couldn't destroy any workers")
View
46 cmd_launch_workers.py
@@ -19,28 +19,28 @@
Options:
- --apikey Hub APIKEY
- Environment: HUB_APIKEY
+ --hub-apikey Hub APIKEY
+ Environment: HUB_APIKEY
- --backup-id TurnKey Backup ID to restore
+ --backup-id TurnKey Backup ID to restore
- --region Region for instance launch (default: us-east-1)
- Regions:
+ --region Region for instance launch (default: us-east-1)
+ Regions:
- us-east-1 (Virginia, USA)
- us-west-1 (California, USA)
- eu-west-1 (Ireland, Europe)
- ap-southeast-1 (Singapore, Asia)
+ us-east-1 (Virginia, USA)
+ us-west-1 (California, USA)
+ eu-west-1 (Ireland, Europe)
+ ap-southeast-1 (Singapore, Asia)
- --size Instance size (default: m1.small)
- Sizes:
+ --size Instance size (default: m1.small)
+ Sizes:
- t1.micro (1 CPU core, 613M RAM, no tmp storage)
- m1.small (1 CPU core, 1.7G RAM, 160G tmp storage)
- c1.medium (2 CPU cores, 1.7G RAM, 350G tmp storage)
+ t1.micro (1 CPU core, 613M RAM, no tmp storage)
+ m1.small (1 CPU core, 1.7G RAM, 160G tmp storage)
+ c1.medium (2 CPU cores, 1.7G RAM, 350G tmp storage)
- --type Instance type <s3|ebs> (default: s3)
- --label Hub description label for all launched servers
+ --type Instance type <s3|ebs> (default: s3)
+ --label Hub description label for all launched servers
Usage examples:
@@ -80,12 +80,12 @@ def main():
'backup_id': None,
}
- apikey = os.environ.get('HUB_APIKEY', os.environ.get('CLOUDTASK_APIKEY'))
+ hub_apikey = os.environ.get('HUB_APIKEY', os.environ.get('CLOUDTASK_HUB_APIKEY'))
try:
opts, args = getopt.gnu_getopt(sys.argv[1:],
'h', [ 'help',
- 'apikey=' ] +
+ 'hub-apikey=' ] +
[ key.replace('_', '-') + '='
for key in kwargs ])
except getopt.GetoptError, e:
@@ -95,16 +95,16 @@ def main():
if opt in ('-h', '--help'):
usage()
- if opt == '--apikey':
- apikey = val
+ if opt == '--hub-apikey':
+ hub_apikey = val
for key in kwargs:
if opt == '--' + key.replace('_', '-'):
kwargs[key] = val
break
- if not apikey:
- fatal("missing required APIKEY")
+ if not hub_apikey:
+ fatal("missing required HUB_APIKEY")
if len(args) < 2:
usage()
@@ -126,7 +126,7 @@ def main():
output = file(output, "w")
- for address in Hub(apikey).launch(howmany, **kwargs):
+ for address in Hub(hub_apikey).launch(howmany, **kwargs):
print >> output, address
if __name__ == "__main__":
View
4 docs/cloudtask-destroy-workers.html
@@ -352,9 +352,9 @@ <h2 class="subtitle" id="destroy-pre-allocated-cloud-workers">Destroy pre-alloca
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
-<kbd><span class="option">--apikey</span></kbd></td>
+<kbd><span class="option">--hub-apikey</span></kbd></td>
<td>Hub APIKEY
-Environment: HUB_APIKEY</td></tr>
+Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY</td></tr>
</tbody>
</table>
</div>
View
4 docs/cloudtask-destroy-workers.man
@@ -47,10 +47,10 @@ If \(aq\-\(aq is specified, read list of IPs from stdin.
.SH OPTIONS
.INDENT 0.0
.TP
-.B \-\-apikey
+.B \-\-hub\-apikey
.
Hub APIKEY
-Environment: HUB_APIKEY
+Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY
.UNINDENT
.SH RETURN CODES
.sp
View
4 docs/cloudtask-destroy-workers.txt
@@ -34,8 +34,8 @@ If '-' is specified, read list of IPs from stdin.
OPTIONS
=======
---apikey Hub APIKEY
- Environment: HUB_APIKEY
+--hub-apikey Hub APIKEY
+ Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY
RETURN CODES
============
View
4 docs/cloudtask-launch-workers.html
@@ -357,9 +357,9 @@ <h2 class="subtitle" id="pre-allocate-cloudtask-workers">Pre-allocate cloudtask
<col class="description" />
<tbody valign="top">
<tr><td class="option-group">
-<kbd><span class="option">--apikey</span></kbd></td>
+<kbd><span class="option">--hub-apikey</span></kbd></td>
<td><p class="first">Hub APIKEY</p>
-<p class="last">Environment: HUB_APIKEY</p>
+<p class="last">Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY</p>
</td></tr>
<tr><td class="option-group">
<kbd><span class="option">--backup-id=<var>ID</var></span></kbd></td>
View
4 docs/cloudtask-launch-workers.man
@@ -53,11 +53,11 @@ workers. If \(aq\-\(aq then print addresses to stdout.
.SH OPTIONS
.INDENT 0.0
.TP
-.B \-\-apikey
+.B \-\-hub\-apikey
.
Hub APIKEY
.sp
-Environment: HUB_APIKEY
+Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY
.TP
.BI \-\-backup\-id\fB= ID
.
View
4 docs/cloudtask-launch-workers.txt
@@ -40,10 +40,10 @@ workers. If '-' then print addresses to stdout.
OPTIONS
=======
---apikey
+--hub-apikey
Hub APIKEY
- Environment: HUB_APIKEY
+ Environment: HUB_APIKEY | CLOUDTASK_HUB_APIKEY
--backup-id=ID
TurnKey Backup ID to restore on launch

0 comments on commit 122cb81

Please sign in to comment.
Something went wrong with that request. Please try again.