hpcloud 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +127 -0
- data/LICENSE +1 -0
- data/README.rdoc +59 -0
- data/bin/hpcloud +11 -0
- data/completion/hpcloud +372 -0
- data/lib/hpcloud/accounts.rb +288 -0
- data/lib/hpcloud/acl.rb +112 -0
- data/lib/hpcloud/acl_cmd.rb +81 -0
- data/lib/hpcloud/address_helper.rb +63 -0
- data/lib/hpcloud/addresses.rb +42 -0
- data/lib/hpcloud/auth_cache.rb +128 -0
- data/lib/hpcloud/base_helper.rb +56 -0
- data/lib/hpcloud/checker.rb +104 -0
- data/lib/hpcloud/cli.rb +170 -0
- data/lib/hpcloud/cli_status.rb +80 -0
- data/lib/hpcloud/columns.rb +46 -0
- data/lib/hpcloud/commands/account/catalog.rb +57 -0
- data/lib/hpcloud/commands/account/copy.rb +44 -0
- data/lib/hpcloud/commands/account/edit.rb +204 -0
- data/lib/hpcloud/commands/account/remove.rb +53 -0
- data/lib/hpcloud/commands/account/setup.rb +40 -0
- data/lib/hpcloud/commands/account/tenants.rb +43 -0
- data/lib/hpcloud/commands/account/use.rb +46 -0
- data/lib/hpcloud/commands/account/verify.rb +55 -0
- data/lib/hpcloud/commands/account.rb +67 -0
- data/lib/hpcloud/commands/acl/grant.rb +59 -0
- data/lib/hpcloud/commands/acl/revoke.rb +52 -0
- data/lib/hpcloud/commands/acl.rb +63 -0
- data/lib/hpcloud/commands/addresses/add.rb +67 -0
- data/lib/hpcloud/commands/addresses/associate.rb +63 -0
- data/lib/hpcloud/commands/addresses/disassociate.rb +58 -0
- data/lib/hpcloud/commands/addresses/remove.rb +57 -0
- data/lib/hpcloud/commands/addresses.rb +63 -0
- data/lib/hpcloud/commands/cdn_containers/add.rb +56 -0
- data/lib/hpcloud/commands/cdn_containers/get.rb +70 -0
- data/lib/hpcloud/commands/cdn_containers/location.rb +61 -0
- data/lib/hpcloud/commands/cdn_containers/remove.rb +55 -0
- data/lib/hpcloud/commands/cdn_containers/set.rb +63 -0
- data/lib/hpcloud/commands/cdn_containers.rb +72 -0
- data/lib/hpcloud/commands/complete.rb +60 -0
- data/lib/hpcloud/commands/config/set.rb +63 -0
- data/lib/hpcloud/commands/config.rb +46 -0
- data/lib/hpcloud/commands/containers/add.rb +67 -0
- data/lib/hpcloud/commands/containers/remove.rb +63 -0
- data/lib/hpcloud/commands/containers/sync.rb +59 -0
- data/lib/hpcloud/commands/containers.rb +24 -0
- data/lib/hpcloud/commands/copy.rb +78 -0
- data/lib/hpcloud/commands/dns/add.rb +56 -0
- data/lib/hpcloud/commands/dns/records/add.rb +50 -0
- data/lib/hpcloud/commands/dns/records/remove.rb +53 -0
- data/lib/hpcloud/commands/dns/records/update.rb +50 -0
- data/lib/hpcloud/commands/dns/records.rb +57 -0
- data/lib/hpcloud/commands/dns/remove.rb +57 -0
- data/lib/hpcloud/commands/dns/servers.rb +57 -0
- data/lib/hpcloud/commands/dns/update.rb +58 -0
- data/lib/hpcloud/commands/dns.rb +65 -0
- data/lib/hpcloud/commands/flavors.rb +59 -0
- data/lib/hpcloud/commands/get.rb +58 -0
- data/lib/hpcloud/commands/images/add.rb +54 -0
- data/lib/hpcloud/commands/images/metadata/add.rb +54 -0
- data/lib/hpcloud/commands/images/metadata/remove.rb +56 -0
- data/lib/hpcloud/commands/images/metadata.rb +54 -0
- data/lib/hpcloud/commands/images/remove.rb +58 -0
- data/lib/hpcloud/commands/images.rb +67 -0
- data/lib/hpcloud/commands/info.rb +41 -0
- data/lib/hpcloud/commands/keypairs/add.rb +73 -0
- data/lib/hpcloud/commands/keypairs/import.rb +62 -0
- data/lib/hpcloud/commands/keypairs/private/add.rb +44 -0
- data/lib/hpcloud/commands/keypairs/private/location.rb +50 -0
- data/lib/hpcloud/commands/keypairs/private/remove.rb +52 -0
- data/lib/hpcloud/commands/keypairs/private.rb +47 -0
- data/lib/hpcloud/commands/keypairs/public_key.rb +51 -0
- data/lib/hpcloud/commands/keypairs/remove.rb +58 -0
- data/lib/hpcloud/commands/keypairs.rb +64 -0
- data/lib/hpcloud/commands/lb/add.rb +92 -0
- data/lib/hpcloud/commands/lb/algorithms.rb +55 -0
- data/lib/hpcloud/commands/lb/limits.rb +55 -0
- data/lib/hpcloud/commands/lb/nodes/add.rb +47 -0
- data/lib/hpcloud/commands/lb/nodes/remove.rb +54 -0
- data/lib/hpcloud/commands/lb/nodes/update.rb +47 -0
- data/lib/hpcloud/commands/lb/nodes.rb +55 -0
- data/lib/hpcloud/commands/lb/protocols.rb +55 -0
- data/lib/hpcloud/commands/lb/remove.rb +54 -0
- data/lib/hpcloud/commands/lb/update.rb +46 -0
- data/lib/hpcloud/commands/lb/versions.rb +55 -0
- data/lib/hpcloud/commands/lb/virtualips.rb +51 -0
- data/lib/hpcloud/commands/lb.rb +73 -0
- data/lib/hpcloud/commands/list.rb +114 -0
- data/lib/hpcloud/commands/location.rb +56 -0
- data/lib/hpcloud/commands/metadata/set.rb +61 -0
- data/lib/hpcloud/commands/metadata.rb +60 -0
- data/lib/hpcloud/commands/migrate.rb +61 -0
- data/lib/hpcloud/commands/move.rb +73 -0
- data/lib/hpcloud/commands/networks/add.rb +55 -0
- data/lib/hpcloud/commands/networks/remove.rb +57 -0
- data/lib/hpcloud/commands/networks/update.rb +54 -0
- data/lib/hpcloud/commands/networks.rb +63 -0
- data/lib/hpcloud/commands/ports/add.rb +81 -0
- data/lib/hpcloud/commands/ports/remove.rb +57 -0
- data/lib/hpcloud/commands/ports/update.rb +67 -0
- data/lib/hpcloud/commands/ports.rb +63 -0
- data/lib/hpcloud/commands/remove.rb +75 -0
- data/lib/hpcloud/commands/routers/add.rb +67 -0
- data/lib/hpcloud/commands/routers/interface/add.rb +59 -0
- data/lib/hpcloud/commands/routers/interface/remove.rb +66 -0
- data/lib/hpcloud/commands/routers/remove.rb +54 -0
- data/lib/hpcloud/commands/routers/update.rb +66 -0
- data/lib/hpcloud/commands/routers.rb +66 -0
- data/lib/hpcloud/commands/securitygroups/add.rb +52 -0
- data/lib/hpcloud/commands/securitygroups/remove.rb +57 -0
- data/lib/hpcloud/commands/securitygroups/rules/add.rb +126 -0
- data/lib/hpcloud/commands/securitygroups/rules/remove.rb +51 -0
- data/lib/hpcloud/commands/securitygroups/rules.rb +56 -0
- data/lib/hpcloud/commands/securitygroups.rb +62 -0
- data/lib/hpcloud/commands/servers/add.rb +100 -0
- data/lib/hpcloud/commands/servers/console.rb +81 -0
- data/lib/hpcloud/commands/servers/limits.rb +46 -0
- data/lib/hpcloud/commands/servers/metadata/add.rb +56 -0
- data/lib/hpcloud/commands/servers/metadata/remove.rb +57 -0
- data/lib/hpcloud/commands/servers/metadata.rb +56 -0
- data/lib/hpcloud/commands/servers/password.rb +47 -0
- data/lib/hpcloud/commands/servers/ratelimits.rb +46 -0
- data/lib/hpcloud/commands/servers/reboot.rb +61 -0
- data/lib/hpcloud/commands/servers/rebuild.rb +59 -0
- data/lib/hpcloud/commands/servers/remove.rb +58 -0
- data/lib/hpcloud/commands/servers/securitygroups/add.rb +47 -0
- data/lib/hpcloud/commands/servers/securitygroups/remove.rb +47 -0
- data/lib/hpcloud/commands/servers/ssh.rb +92 -0
- data/lib/hpcloud/commands/servers.rb +92 -0
- data/lib/hpcloud/commands/snapshots/add.rb +62 -0
- data/lib/hpcloud/commands/snapshots/remove.rb +58 -0
- data/lib/hpcloud/commands/snapshots.rb +62 -0
- data/lib/hpcloud/commands/subnets/add.rb +78 -0
- data/lib/hpcloud/commands/subnets/remove.rb +57 -0
- data/lib/hpcloud/commands/subnets/update.rb +70 -0
- data/lib/hpcloud/commands/subnets.rb +63 -0
- data/lib/hpcloud/commands/tempurl.rb +62 -0
- data/lib/hpcloud/commands/volumes/add.rb +88 -0
- data/lib/hpcloud/commands/volumes/attach.rb +59 -0
- data/lib/hpcloud/commands/volumes/detach.rb +57 -0
- data/lib/hpcloud/commands/volumes/metadata/add.rb +54 -0
- data/lib/hpcloud/commands/volumes/metadata.rb +55 -0
- data/lib/hpcloud/commands/volumes/remove.rb +57 -0
- data/lib/hpcloud/commands/volumes/server.rb +64 -0
- data/lib/hpcloud/commands/volumes.rb +65 -0
- data/lib/hpcloud/config.rb +205 -0
- data/lib/hpcloud/connection.rb +290 -0
- data/lib/hpcloud/container_resource.rb +175 -0
- data/lib/hpcloud/database_helper.rb +70 -0
- data/lib/hpcloud/databases.rb +38 -0
- data/lib/hpcloud/dns_helper.rb +125 -0
- data/lib/hpcloud/dnss.rb +38 -0
- data/lib/hpcloud/error_response.rb +89 -0
- data/lib/hpcloud/exceptions/base.rb +35 -0
- data/lib/hpcloud/exceptions/general.rb +34 -0
- data/lib/hpcloud/exceptions/not_found.rb +34 -0
- data/lib/hpcloud/flavors.rb +40 -0
- data/lib/hpcloud/floating_ip_helper.rb +114 -0
- data/lib/hpcloud/floating_ips.rb +42 -0
- data/lib/hpcloud/fog_collection.rb +124 -0
- data/lib/hpcloud/image_helper.rb +111 -0
- data/lib/hpcloud/images.rb +43 -0
- data/lib/hpcloud/keypair_helper.rb +109 -0
- data/lib/hpcloud/keypairs.rb +41 -0
- data/lib/hpcloud/lb_algorithms.rb +37 -0
- data/lib/hpcloud/lb_limits.rb +37 -0
- data/lib/hpcloud/lb_nodes.rb +42 -0
- data/lib/hpcloud/lb_protocols.rb +37 -0
- data/lib/hpcloud/lb_versions.rb +37 -0
- data/lib/hpcloud/lb_virtualips.rb +42 -0
- data/lib/hpcloud/lbs.rb +38 -0
- data/lib/hpcloud/local_resource.rb +183 -0
- data/lib/hpcloud/log.rb +55 -0
- data/lib/hpcloud/metadata.rb +118 -0
- data/lib/hpcloud/monkey.rb +22 -0
- data/lib/hpcloud/network_helper.rb +88 -0
- data/lib/hpcloud/networks.rb +47 -0
- data/lib/hpcloud/object_store.rb +66 -0
- data/lib/hpcloud/port_helper.rb +150 -0
- data/lib/hpcloud/ports.rb +38 -0
- data/lib/hpcloud/progress.rb +53 -0
- data/lib/hpcloud/remote_resource.rb +512 -0
- data/lib/hpcloud/resource.rb +264 -0
- data/lib/hpcloud/resource_factory.rb +110 -0
- data/lib/hpcloud/routers.rb +56 -0
- data/lib/hpcloud/rule_helper.rb +70 -0
- data/lib/hpcloud/rules.rb +41 -0
- data/lib/hpcloud/security_group_helper.rb +59 -0
- data/lib/hpcloud/security_groups.rb +37 -0
- data/lib/hpcloud/server_helper.rb +318 -0
- data/lib/hpcloud/servers.rb +47 -0
- data/lib/hpcloud/shared_resource.rb +172 -0
- data/lib/hpcloud/snapshot_helper.rb +78 -0
- data/lib/hpcloud/snapshots.rb +38 -0
- data/lib/hpcloud/subnet_helper.rb +170 -0
- data/lib/hpcloud/subnets.rb +38 -0
- data/lib/hpcloud/tableizer.rb +77 -0
- data/lib/hpcloud/thor_ext/thor.rb +54 -0
- data/lib/hpcloud/time_parser.rb +47 -0
- data/lib/hpcloud/version.rb +27 -0
- data/lib/hpcloud/volume_attachment.rb +58 -0
- data/lib/hpcloud/volume_attachments.rb +58 -0
- data/lib/hpcloud/volume_helper.rb +119 -0
- data/lib/hpcloud/volumes.rb +38 -0
- data/lib/hpcloud.rb +112 -0
- data/lib/monkey/hp/lb.rb +188 -0
- data/lib/monkey/hp/models/lb/algorithm.rb +32 -0
- data/lib/monkey/hp/models/lb/algorithms.rb +46 -0
- data/lib/monkey/hp/models/lb/limit.rb +38 -0
- data/lib/monkey/hp/models/lb/limits.rb +50 -0
- data/lib/monkey/hp/models/lb/load_balancer.rb +70 -0
- data/lib/monkey/hp/models/lb/load_balancers.rb +46 -0
- data/lib/monkey/hp/models/lb/node.rb +69 -0
- data/lib/monkey/hp/models/lb/nodes.rb +47 -0
- data/lib/monkey/hp/models/lb/protocol.rb +33 -0
- data/lib/monkey/hp/models/lb/protocols.rb +46 -0
- data/lib/monkey/hp/models/lb/version.rb +34 -0
- data/lib/monkey/hp/models/lb/versions.rb +47 -0
- data/lib/monkey/hp/models/lb/virtual_ip.rb +37 -0
- data/lib/monkey/hp/models/lb/virtual_ips.rb +47 -0
- data/lib/monkey/hp/requests/lb/create_load_balancer.rb +64 -0
- data/lib/monkey/hp/requests/lb/create_load_balancer_node.rb +58 -0
- data/lib/monkey/hp/requests/lb/delete_load_balancer.rb +54 -0
- data/lib/monkey/hp/requests/lb/delete_load_balancer_node.rb +60 -0
- data/lib/monkey/hp/requests/lb/get_load_balancer.rb +88 -0
- data/lib/monkey/hp/requests/lb/get_load_balancer_node.rb +60 -0
- data/lib/monkey/hp/requests/lb/get_version.rb +68 -0
- data/lib/monkey/hp/requests/lb/get_virtual_ips.rb +48 -0
- data/lib/monkey/hp/requests/lb/list_algorithms.rb +51 -0
- data/lib/monkey/hp/requests/lb/list_limits.rb +60 -0
- data/lib/monkey/hp/requests/lb/list_load_balancer_nodes.rb +79 -0
- data/lib/monkey/hp/requests/lb/list_load_balancer_virtual_ips.rb +76 -0
- data/lib/monkey/hp/requests/lb/list_load_balancers.rb +69 -0
- data/lib/monkey/hp/requests/lb/list_protocols.rb +51 -0
- data/lib/monkey/hp/requests/lb/list_versions.rb +51 -0
- data/lib/monkey/hp/requests/lb/update_load_balancer.rb +46 -0
- data/lib/monkey/hp/requests/lb/update_load_balancer_node.rb +50 -0
- metadata +368 -0
data/CHANGELOG
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
#HP Cloud Services UNIX CLI Release Notes
|
2
|
+
|
3
|
+
##Release 2.0.0 Features##
|
4
|
+
|
5
|
+
The 2.0.0 release is available for download from [https://docs.hpcloud.com/file/hpcloud-2.0.0.gem](/file/hpcloud-2.0.0.gem). This release was made available on 6/15/2013 and contains the following new features:
|
6
|
+
|
7
|
+
* Support for next generation networking cloud added, including the following features:
|
8
|
+
- `networks` commands
|
9
|
+
- `routers` commands
|
10
|
+
- `ports` commands
|
11
|
+
- `subnets` commands
|
12
|
+
* Support for load balancer as a service (LBaaS) with the `lb` commands
|
13
|
+
* Personality support for `servers:add`
|
14
|
+
* The `containers:sync` command now takes a container or location for destination
|
15
|
+
* The `servers:limits` command was added to print comput limits
|
16
|
+
* The `servers:ratelimits` command was added to print comput limits
|
17
|
+
* Object metadata can now be shown and set with `metadata` and `metadata:set`
|
18
|
+
* Added --userpass option to account:setup and account:edit to allow authentication via user name and password rather than authentication keys.
|
19
|
+
|
20
|
+
###Known Issues###
|
21
|
+
|
22
|
+
* The `--bootable option` has been removed from the `volumes` (list) command
|
23
|
+
* The v3 identity servers are not supported by this release
|
24
|
+
|
25
|
+
##Release 1.9.0 Features##
|
26
|
+
|
27
|
+
The 1.9.0 release is available for download from [https://docs.hpcloud.com/file/hpcloud-1.9.0.gem](/file/hpcloud-1.9.0.gem). This release was made available on 5/15/2013 and contains the following new features:
|
28
|
+
|
29
|
+
* Support for domain name service (DNS)
|
30
|
+
* New `account:catalog` command dumps the service catalog for the given account
|
31
|
+
* Default availability zone is now the alphabetically-first zone in the service catalog.
|
32
|
+
|
33
|
+
###Known Issues###
|
34
|
+
|
35
|
+
* Support for availability zones in the `config.yml` file is deprecated. Support for that future will be removed in the future. There are no longer any hard-coded default zones in the configuration.
|
36
|
+
|
37
|
+
##Release 1.8.0 Features##
|
38
|
+
|
39
|
+
The 1.8.0 release is available for download from [https://docs.hpcloud.com/file/hpcloud-1.8.0.gem](/file/hpcloud-1.8.0.gem). This release was made available on 4/15/2013 and contains the following new features:
|
40
|
+
|
41
|
+
* Support for the `after` and `at` options for the `remove` command added
|
42
|
+
|
43
|
+
###Known Issues###
|
44
|
+
|
45
|
+
* None for this release.
|
46
|
+
|
47
|
+
|
48
|
+
##Release 1.7.0 Features##
|
49
|
+
|
50
|
+
The 1.7.0 release is available for download from https://docs.hpcloud.com/file/hpcloud-1.7.0.gem. This release was made available on 3/1/2013 and contains the following new features:
|
51
|
+
|
52
|
+
* Support for large file uploads greater than 5 gigabytes added
|
53
|
+
* Option `-r` (retry) to `copy` command for large file uploads added
|
54
|
+
* Option `-c` option added to most reports so you can specify the columns they want to see
|
55
|
+
* Option `-d` option added to most reports so you can specify the column delimiter for reports
|
56
|
+
* Option `-l` added to provide a long listing for containers and their contents
|
57
|
+
* Option `-u` added to `servers:add` to pass user data to a new server for custom configuration
|
58
|
+
* New containers:sync command for container replication
|
59
|
+
|
60
|
+
###Known Issues###
|
61
|
+
|
62
|
+
* None for this release.
|
63
|
+
|
64
|
+
##Release 1.6.0 Features##
|
65
|
+
|
66
|
+
The 1.6.0 release is available for download from https://docs.hpcloud.com/file/hpcloud-1.6.0.gem. This release was made available on 1/30/2013 and contains the following new features:
|
67
|
+
|
68
|
+
* Compatibility with the 0.0.19 Ruby Fog release included
|
69
|
+
* Command `servers:ssh` supports using an IP address in addition to the server name or ID added
|
70
|
+
* Several minor bug fixes included
|
71
|
+
|
72
|
+
###Known Issues###
|
73
|
+
|
74
|
+
* None for this release.
|
75
|
+
|
76
|
+
##Release 1.5.0 Features##
|
77
|
+
|
78
|
+
The 1.5.0 release is available for download from https://docs.hpcloud.com/file/hpcloud-1.5.0.gem. This release was made available on 1/18/2013 and contains the following new features:
|
79
|
+
|
80
|
+
* Command `complete` added to install a bash completion file to allow you to tab complete hpcloud commands
|
81
|
+
* Option `--debug` added to most commands to produce verbose trace
|
82
|
+
* Option `--source-account` added to the `copy` command to allow files to be copied from one account to another.
|
83
|
+
* Command `migrate` added to allow object store migration from different providers.
|
84
|
+
* Option `--provider` added to the `account:setup` command to allow you to supply providers other than HP for migration.
|
85
|
+
|
86
|
+
###Known Issues###
|
87
|
+
|
88
|
+
* None for this release.
|
89
|
+
|
90
|
+
##Release 1.4.0 Features##
|
91
|
+
|
92
|
+
The 1.4.0 release is available for download from https://docs.hpcloud.com/file/hpcloud-1.4.0.gem. This release was made available on 12/11/2012 and contains the following new features:
|
93
|
+
|
94
|
+
* Command `servers:console` added to display the console of a server
|
95
|
+
* Command `servers:ssh` added to allow you to log in via secure shell to a server
|
96
|
+
* Command `keypairs:private` added to display the private keys known to the CLI
|
97
|
+
* Command `keypairs:private` added to display the private keys known to the CLI
|
98
|
+
* Command `keypairs:private:add` added to allow you to add a private key pair to the CLI
|
99
|
+
* Command `keypairs:private:location` added to display the physical location of a private key file
|
100
|
+
* Command `keypairs:private:remove` added to allow you to remove a private key
|
101
|
+
* Command `account:verify` added to allow you to verify an account file
|
102
|
+
* Command `account:edit` and `account:update` commands combined
|
103
|
+
|
104
|
+
###Known Issues###
|
105
|
+
|
106
|
+
* When the `-o` option is used to `keypairs:add` the private key is now stored in `~/.hpcloud/keypairs` directory instead of the current directory.
|
107
|
+
|
108
|
+
##Release 1.3.0 Features##
|
109
|
+
|
110
|
+
This release was made available on 12/6/2012 and contains the following new features:
|
111
|
+
|
112
|
+
* Command `servers:rebuild` added
|
113
|
+
* Option `-m` added to the `copy` command to allow you to override the mime type
|
114
|
+
* Option `-s` added to the `cdn:containers:location` command to print the SSL and non-SSL URLs for CDN objects
|
115
|
+
* Commands `cdn:containers:add` and `cdn:containers:remove` now accept multiple arguments
|
116
|
+
* CLI help text significantly updated
|
117
|
+
* Default account can be set to any configured account
|
118
|
+
* Commands `acl:grant` and `acl:revoke` added to provide support for cross-project access control lists (ACLs)
|
119
|
+
* Command `volumes:add` added to provide support for bootable volume creation
|
120
|
+
* Command `servers:add` added to provide support for creating a server from a bootable volume
|
121
|
+
|
122
|
+
**Note**: This release of the UNIX CLI requires the [Ruby Fog v0.0.18](https://docs.hpcloud.com/bindings/fog/install) binding.
|
123
|
+
|
124
|
+
###Known Issues###
|
125
|
+
|
126
|
+
* The syntax of the `servers:add` command has changed; you must pass in an image or volume with the `-i` or `-v` option, respectively
|
127
|
+
* Command `acl` displays data as a table
|
data/LICENSE
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Copyright (c) 2011 Hewlett-Packard Development Company, L.P.
|
data/README.rdoc
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
= Unix Command Line Interface
|
2
|
+
|
3
|
+
The Unix Command Line Interface is a tool which allows Unix or Mac users to manage their HP Cloud Services from the command line.
|
4
|
+
|
5
|
+
== System Requirements
|
6
|
+
|
7
|
+
The current version of the CLI requires Ruby 1.9.2 or 1.8.7 and a recent version of rubygems (generally included with the ruby package).
|
8
|
+
|
9
|
+
== Installation
|
10
|
+
|
11
|
+
1) Start by installing the software, HP Cloud Unix CLI depends on:
|
12
|
+
|
13
|
+
- HP Cloud Ruby Fog Binding[http://docs.hpcloud.com/bindings/fog]
|
14
|
+
|
15
|
+
2) Download the HP Cloud Services Unix CLI gem[http://docs.hpcloud.com/cli/unix] and unpack it into a local directory.
|
16
|
+
|
17
|
+
3) 'cd' into the directory, you downloaded the gem into during Step 2) and type:
|
18
|
+
|
19
|
+
gem install hpcloud-<version>.gem
|
20
|
+
|
21
|
+
where <version> is the version number of the downloaded and unpacked gem file, for example 0.0.8
|
22
|
+
|
23
|
+
You should see the gem and its dependencies being installed on your system. To verify installation, simply type:
|
24
|
+
|
25
|
+
hpcloud
|
26
|
+
|
27
|
+
If you see a listing of available commands, your installation was successful.
|
28
|
+
|
29
|
+
4) Once installation is complete you can set up your account:
|
30
|
+
|
31
|
+
hpcloud account:setup
|
32
|
+
|
33
|
+
That’s it! Try out the usage examples below.
|
34
|
+
|
35
|
+
If you should ever need to remove the CLI:
|
36
|
+
|
37
|
+
gem uninstall hpcloud
|
38
|
+
|
39
|
+
= In-Command Help
|
40
|
+
|
41
|
+
You can get a list of commands at any time by calling the hpcloud command without any arguments:
|
42
|
+
|
43
|
+
hpcloud
|
44
|
+
|
45
|
+
Each command has help built in which includes specific examples of use, aliases you can use and more. To see help for a specific command use:
|
46
|
+
|
47
|
+
hpcloud help <command>
|
48
|
+
|
49
|
+
If you want to check which version of the tool you have installed:
|
50
|
+
|
51
|
+
hpcloud info
|
52
|
+
|
53
|
+
= Documentation and Usage
|
54
|
+
|
55
|
+
Detailed documentation and usage examples can be found at HP Cloud Unix CLI[http://docs.hpcloud.com/cli/unix] page.
|
56
|
+
|
57
|
+
= Copyright
|
58
|
+
|
59
|
+
See LICENSE for copyright details.
|
data/bin/hpcloud
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
4
|
+
$LOAD_PATH.unshift(lib_dir) if File.directory?(lib_dir) && !$LOAD_PATH.include?(lib_dir)
|
5
|
+
|
6
|
+
ENV['HPCLOUD_CLI_NAME'] = File.basename($0)
|
7
|
+
|
8
|
+
require 'rubygems'
|
9
|
+
require 'hpcloud'
|
10
|
+
|
11
|
+
HP::Cloud::CLI.start
|
data/completion/hpcloud
ADDED
@@ -0,0 +1,372 @@
|
|
1
|
+
_hpcloud()
|
2
|
+
{
|
3
|
+
local cur prev opts cmds cmd files
|
4
|
+
COMPREPLY=()
|
5
|
+
_get_comp_words_by_ref -n : cur prev words
|
6
|
+
|
7
|
+
if [[ ${cur} == -* ]] ; then
|
8
|
+
if [ "${prev}" == "hpcloud" ]
|
9
|
+
then
|
10
|
+
cmd="hpcloud"
|
11
|
+
else
|
12
|
+
cmd="${words[1]}"
|
13
|
+
fi
|
14
|
+
case "${cmd}" in
|
15
|
+
hpcloud)
|
16
|
+
opts="--help --version"
|
17
|
+
;;
|
18
|
+
account:catalog)
|
19
|
+
opts="--debug"
|
20
|
+
;;
|
21
|
+
account:edit)
|
22
|
+
opts="--no-validate --provider"
|
23
|
+
;;
|
24
|
+
account:setup)
|
25
|
+
opts="--no-validate --provider"
|
26
|
+
;;
|
27
|
+
account:verify)
|
28
|
+
opts="--debug"
|
29
|
+
;;
|
30
|
+
acl)
|
31
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
32
|
+
;;
|
33
|
+
acl:grant)
|
34
|
+
opts="--account-name --debug --availability-zone"
|
35
|
+
;;
|
36
|
+
acl:revoke)
|
37
|
+
opts="--account-name --debug --availability-zone"
|
38
|
+
;;
|
39
|
+
addresses)
|
40
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
41
|
+
;;
|
42
|
+
addresses:add)
|
43
|
+
opts="--floating-ip --fixed-ip --account-name --debug --port --availability-zone --network"
|
44
|
+
;;
|
45
|
+
addresses:associate)
|
46
|
+
opts="--account-name --debug --availability-zone"
|
47
|
+
;;
|
48
|
+
addresses:disassociate)
|
49
|
+
opts="--account-name --debug --availability-zone"
|
50
|
+
;;
|
51
|
+
addresses:remove)
|
52
|
+
opts="--account-name --debug --availability-zone"
|
53
|
+
;;
|
54
|
+
cdn:containers)
|
55
|
+
opts="--account-name --all --debug --availability-zone"
|
56
|
+
;;
|
57
|
+
cdn:containers:add)
|
58
|
+
opts="--account-name --debug --availability-zone"
|
59
|
+
;;
|
60
|
+
cdn:containers:get)
|
61
|
+
opts="--account-name --debug --availability-zone"
|
62
|
+
;;
|
63
|
+
cdn:containers:location)
|
64
|
+
opts="--account-name --debug --availability-zone --ssl"
|
65
|
+
;;
|
66
|
+
cdn:containers:remove)
|
67
|
+
opts="--account-name --debug --availability-zone"
|
68
|
+
;;
|
69
|
+
cdn:containers:set)
|
70
|
+
opts="--account-name --debug --availability-zone"
|
71
|
+
;;
|
72
|
+
containers:add)
|
73
|
+
opts="--account-name --debug --availability-zone --force"
|
74
|
+
;;
|
75
|
+
containers:remove)
|
76
|
+
opts="--account-name --debug --availability-zone --force"
|
77
|
+
;;
|
78
|
+
containers:sync)
|
79
|
+
opts="--account-name --debug --availability-zone"
|
80
|
+
;;
|
81
|
+
copy)
|
82
|
+
opts="--mime --account-name --debug --restart --availability-zone --source-account"
|
83
|
+
;;
|
84
|
+
dns)
|
85
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
86
|
+
;;
|
87
|
+
dns:add)
|
88
|
+
opts="--account-name --ttl --debug --availability-zone"
|
89
|
+
;;
|
90
|
+
dns:records)
|
91
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
92
|
+
;;
|
93
|
+
dns:records:add)
|
94
|
+
opts="--account-name --debug --availability-zone"
|
95
|
+
;;
|
96
|
+
dns:records:remove)
|
97
|
+
opts="--account-name --debug --availability-zone"
|
98
|
+
;;
|
99
|
+
dns:records:update)
|
100
|
+
opts="--account-name --debug --availability-zone"
|
101
|
+
;;
|
102
|
+
dns:remove)
|
103
|
+
opts="--account-name --debug --availability-zone"
|
104
|
+
;;
|
105
|
+
dns:servers)
|
106
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
107
|
+
;;
|
108
|
+
dns:update)
|
109
|
+
opts="--account-name --ttl --debug --email --availability-zone"
|
110
|
+
;;
|
111
|
+
flavors)
|
112
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
113
|
+
;;
|
114
|
+
get)
|
115
|
+
opts="--account-name --debug --availability-zone"
|
116
|
+
;;
|
117
|
+
images)
|
118
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
119
|
+
;;
|
120
|
+
images:add)
|
121
|
+
opts="--account-name --debug --availability-zone --metadata"
|
122
|
+
;;
|
123
|
+
images:metadata)
|
124
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
125
|
+
;;
|
126
|
+
images:metadata:add)
|
127
|
+
opts="--account-name --debug --availability-zone"
|
128
|
+
;;
|
129
|
+
images:metadata:remove)
|
130
|
+
opts="--account-name --debug --availability-zone"
|
131
|
+
;;
|
132
|
+
images:remove)
|
133
|
+
opts="--account-name --debug --availability-zone"
|
134
|
+
;;
|
135
|
+
keypairs)
|
136
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
137
|
+
;;
|
138
|
+
keypairs:add)
|
139
|
+
opts="--private-key --account-name --debug --fingerprint --availability-zone --output"
|
140
|
+
;;
|
141
|
+
keypairs:import)
|
142
|
+
opts="--account-name --debug --availability-zone"
|
143
|
+
;;
|
144
|
+
keypairs:public_key)
|
145
|
+
opts="--account-name --debug --availability-zone"
|
146
|
+
;;
|
147
|
+
keypairs:remove)
|
148
|
+
opts="--account-name --debug --availability-zone"
|
149
|
+
;;
|
150
|
+
lb)
|
151
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
152
|
+
;;
|
153
|
+
lb:add)
|
154
|
+
opts="--account-name --debug --availability-zone --nodes --ips"
|
155
|
+
;;
|
156
|
+
lb:algorithms)
|
157
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
158
|
+
;;
|
159
|
+
lb:limits)
|
160
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
161
|
+
;;
|
162
|
+
lb:nodes)
|
163
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
164
|
+
;;
|
165
|
+
lb:nodes:add)
|
166
|
+
opts="--account-name --debug --availability-zone"
|
167
|
+
;;
|
168
|
+
lb:nodes:remove)
|
169
|
+
opts="--account-name --debug --availability-zone"
|
170
|
+
;;
|
171
|
+
lb:nodes:update)
|
172
|
+
opts="--account-name --debug --availability-zone"
|
173
|
+
;;
|
174
|
+
lb:protocols)
|
175
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
176
|
+
;;
|
177
|
+
lb:remove)
|
178
|
+
opts="--account-name --debug --availability-zone"
|
179
|
+
;;
|
180
|
+
lb:update)
|
181
|
+
opts="--account-name --debug --availability-zone"
|
182
|
+
;;
|
183
|
+
lb:versions)
|
184
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
185
|
+
;;
|
186
|
+
lb:virtualips)
|
187
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
188
|
+
;;
|
189
|
+
list)
|
190
|
+
opts="--separator --sync --long --account-name --debug --availability-zone --columns"
|
191
|
+
;;
|
192
|
+
location)
|
193
|
+
opts="--account-name --debug --availability-zone"
|
194
|
+
;;
|
195
|
+
metadata)
|
196
|
+
opts="--account-name --debug --availability-zone"
|
197
|
+
;;
|
198
|
+
metadata:set)
|
199
|
+
opts="--account-name --debug --availability-zone"
|
200
|
+
;;
|
201
|
+
migrate)
|
202
|
+
opts="--mime --account-name --debug --availability-zone"
|
203
|
+
;;
|
204
|
+
move)
|
205
|
+
opts="--account-name --debug --availability-zone"
|
206
|
+
;;
|
207
|
+
networks)
|
208
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
209
|
+
;;
|
210
|
+
networks:add)
|
211
|
+
opts="--account-name --debug --availability-zone --adminstateup"
|
212
|
+
;;
|
213
|
+
networks:remove)
|
214
|
+
opts="--account-name --debug --availability-zone"
|
215
|
+
;;
|
216
|
+
networks:update)
|
217
|
+
opts="--account-name --debug --availability-zone --adminstateup"
|
218
|
+
;;
|
219
|
+
ports)
|
220
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
221
|
+
;;
|
222
|
+
ports:add)
|
223
|
+
opts="--fixedips --macaddress --account-name --debug --adminstate --availability-zone --deviceid --deviceowner --securitygroups"
|
224
|
+
;;
|
225
|
+
ports:remove)
|
226
|
+
opts="--account-name --debug --availability-zone"
|
227
|
+
;;
|
228
|
+
ports:update)
|
229
|
+
opts="--fixedips --account-name --debug --adminstate --availability-zone --deviceid --deviceowner"
|
230
|
+
;;
|
231
|
+
remove)
|
232
|
+
opts="--account-name --at --debug --after --availability-zone --force"
|
233
|
+
;;
|
234
|
+
routers)
|
235
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
236
|
+
;;
|
237
|
+
routers:add)
|
238
|
+
opts="--account-name --debug --availability-zone --gateway --adminstateup"
|
239
|
+
;;
|
240
|
+
routers:interface:add)
|
241
|
+
opts="--account-name --debug --availability-zone"
|
242
|
+
;;
|
243
|
+
routers:interface:remove)
|
244
|
+
opts="--account-name --debug --availability-zone"
|
245
|
+
;;
|
246
|
+
routers:remove)
|
247
|
+
opts="--account-name --debug --availability-zone"
|
248
|
+
;;
|
249
|
+
routers:update)
|
250
|
+
opts="--account-name --debug --availability-zone --gateway --adminstateup"
|
251
|
+
;;
|
252
|
+
securitygroups)
|
253
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
254
|
+
;;
|
255
|
+
securitygroups:add)
|
256
|
+
opts="--account-name --debug --availability-zone"
|
257
|
+
;;
|
258
|
+
securitygroups:remove)
|
259
|
+
opts="--account-name --debug --availability-zone"
|
260
|
+
;;
|
261
|
+
securitygroups:rules)
|
262
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
263
|
+
;;
|
264
|
+
securitygroups:rules:add)
|
265
|
+
opts="--direction --cidr --account-name --port-range --debug --source-group --availability-zone --ethertype"
|
266
|
+
;;
|
267
|
+
securitygroups:rules:remove)
|
268
|
+
opts="--account-name --debug --availability-zone"
|
269
|
+
;;
|
270
|
+
servers)
|
271
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
272
|
+
;;
|
273
|
+
servers:add)
|
274
|
+
opts="--personality --security-group --account-name --volume --debug --private-key-file --image --availability-zone --userdata --metadata --network --key-name"
|
275
|
+
;;
|
276
|
+
servers:console)
|
277
|
+
opts="--dump-password --account-name --debug --private-key-file --availability-zone"
|
278
|
+
;;
|
279
|
+
servers:limits)
|
280
|
+
opts="--account-name --debug --availability-zone"
|
281
|
+
;;
|
282
|
+
servers:metadata)
|
283
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
284
|
+
;;
|
285
|
+
servers:metadata:add)
|
286
|
+
opts="--account-name --debug --availability-zone"
|
287
|
+
;;
|
288
|
+
servers:metadata:remove)
|
289
|
+
opts="--account-name --debug --availability-zone"
|
290
|
+
;;
|
291
|
+
servers:password)
|
292
|
+
opts="--account-name --debug --availability-zone"
|
293
|
+
;;
|
294
|
+
servers:ratelimits)
|
295
|
+
opts="--account-name --debug --availability-zone"
|
296
|
+
;;
|
297
|
+
servers:reboot)
|
298
|
+
opts="--account-name --hard --debug --availability-zone"
|
299
|
+
;;
|
300
|
+
servers:rebuild)
|
301
|
+
opts="--account-name --debug --availability-zone"
|
302
|
+
;;
|
303
|
+
servers:remove)
|
304
|
+
opts="--account-name --debug --availability-zone"
|
305
|
+
;;
|
306
|
+
servers:ssh)
|
307
|
+
opts="--command --account-name --debug --keypair --private-key-file --availability-zone --login"
|
308
|
+
;;
|
309
|
+
snapshots)
|
310
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
311
|
+
;;
|
312
|
+
snapshots:add)
|
313
|
+
opts="--account-name --description --debug --availability-zone --metadata"
|
314
|
+
;;
|
315
|
+
snapshots:remove)
|
316
|
+
opts="--account-name --debug --availability-zone"
|
317
|
+
;;
|
318
|
+
subnets)
|
319
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
320
|
+
;;
|
321
|
+
subnets:add)
|
322
|
+
opts="--hostroutes --account-name --dhcp --debug --availability-zone --gateway --ipversion --dnsnameservers"
|
323
|
+
;;
|
324
|
+
subnets:remove)
|
325
|
+
opts="--account-name --debug --availability-zone"
|
326
|
+
;;
|
327
|
+
subnets:update)
|
328
|
+
opts="--hostroutes --account-name --dhcp --debug --availability-zone --gateway --ipversion --dnsnameservers"
|
329
|
+
;;
|
330
|
+
tempurl)
|
331
|
+
opts="--account-name --debug --availability-zone --time-period --update"
|
332
|
+
;;
|
333
|
+
volumes)
|
334
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
335
|
+
;;
|
336
|
+
volumes:add)
|
337
|
+
opts="--zone --account-name --description --debug --image --availability-zone --metadata --snapshot"
|
338
|
+
;;
|
339
|
+
volumes:attach)
|
340
|
+
opts="--account-name --debug --availability-zone"
|
341
|
+
;;
|
342
|
+
volumes:detach)
|
343
|
+
opts="--account-name --debug --availability-zone"
|
344
|
+
;;
|
345
|
+
volumes:remove)
|
346
|
+
opts="--account-name --debug --availability-zone"
|
347
|
+
;;
|
348
|
+
volumes:server)
|
349
|
+
opts="--separator --account-name --debug --availability-zone --columns"
|
350
|
+
;;
|
351
|
+
esac
|
352
|
+
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
353
|
+
return 0
|
354
|
+
fi
|
355
|
+
if [ "${prev}" == "hpcloud" ]
|
356
|
+
then
|
357
|
+
cmds="account account:catalog account:copy account:edit account:remove account:setup account:use account:verify acl acl:grant acl:revoke addresses addresses:add addresses:associate addresses:disassociate addresses:remove cdn:containers cdn:containers:add cdn:containers:get cdn:containers:location cdn:containers:remove cdn:containers:set complete config config:set containers:add containers:remove containers:sync copy dns dns:add dns:records dns:records:add dns:records:remove dns:records:update dns:remove dns:servers dns:update flavors get help images images:add images:metadata images:metadata:add images:metadata:remove images:remove info keypairs keypairs:add keypairs:import keypairs:private keypairs:private:add keypairs:private:location keypairs:private:remove keypairs:public_key keypairs:remove lb lb:add lb:algorithms lb:limits lb:nodes lb:nodes:add lb:nodes:remove lb:nodes:update lb:protocols lb:remove lb:update lb:versions lb:virtualips list location metadata metadata:set migrate move networks networks:add networks:remove networks:update ports ports:add ports:remove ports:update remove routers routers:add routers:interface:add routers:interface:remove routers:remove routers:update securitygroups securitygroups:add securitygroups:remove securitygroups:rules securitygroups:rules:add securitygroups:rules:remove servers servers:add servers:console servers:limits servers:metadata servers:metadata:add servers:metadata:remove servers:password servers:ratelimits servers:reboot servers:rebuild servers:remove servers:ssh snapshots snapshots:add snapshots:remove subnets subnets:add subnets:remove subnets:update tempurl volumes volumes:add volumes:attach volumes:detach volumes:remove volumes:server"
|
358
|
+
COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
|
359
|
+
__ltrim_colon_completions "$cur"
|
360
|
+
return 0
|
361
|
+
fi
|
362
|
+
|
363
|
+
cmd="${words[1]}"
|
364
|
+
if [ "${cmd}" == "copy" ]
|
365
|
+
then
|
366
|
+
_compopt_o_filenames
|
367
|
+
COMPREPLY=( $( compgen -f -- "$cur" ) $( compgen -d -- "$cur" ) )
|
368
|
+
return 0
|
369
|
+
fi
|
370
|
+
return 0
|
371
|
+
}
|
372
|
+
complete -F _hpcloud hpcloud
|