Repository navigation
added info on bmi and vsi (owner field) #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2ffa7b7
5709a7d
7d51723
c9d9c36
55ebdf1
475bd30
683e419
d873a18
27667d8
954d43f
c1ff0ec
3e1934c
09a9021
be40580
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,7 @@ | |
|
|
||
|
|
||
| class ListServers(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server list [options] | ||
|
|
||
|
|
@@ -88,12 +89,18 @@ def execute(self, args): | |
| 'memory', | ||
| 'primary_ip', | ||
| 'backend_ip', | ||
| 'active_transaction' | ||
| 'active_transaction', | ||
| 'owner' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a trailing comma here to avoid having to modify unrelated lines to add new items?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. mmm sorry Im new in all of this, and not a real developer :( Could not open requirements file: [Errno 2] No such file or directory: 'test-requirements'
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My fault. tests-requirements.txt is in the tools directory. So it should be |
||
| ]) | ||
| table.sortby = args.get('--sortby') or 'host' | ||
|
|
||
| for server in servers: | ||
| server = utils.NestedDict(server) | ||
| user = None | ||
| if 'billingItem' in server: | ||
| if 'orderItem' in server['billingItem']: | ||
| user = (server['billingItem']['orderItem']['order'] | ||
| ['userRecord']['username']) | ||
| table.add_row([ | ||
| server['id'], | ||
| server['datacenter']['name'] or formatting.blank(), | ||
|
|
@@ -103,12 +110,14 @@ def execute(self, args): | |
| server['primaryIpAddress'] or formatting.blank(), | ||
| server['primaryBackendIpAddress'] or formatting.blank(), | ||
| formatting.active_txn(server), | ||
| user or formatting.blank(), | ||
| ]) | ||
|
|
||
| return table | ||
|
|
||
|
|
||
| class ServerDetails(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server detail [--passwords] [--price] <identifier> [options] | ||
|
|
||
|
|
@@ -156,10 +165,17 @@ def execute(self, args): | |
| result['operatingSystem']['softwareLicense'] | ||
| ['softwareDescription']['name'] or formatting.blank() | ||
| )]) | ||
| table.add_row(['created', | ||
| result['provisionDate'] or formatting.blank()]) | ||
|
|
||
| vlan_table = formatting.Table(['type', 'number', 'id']) | ||
| table.add_row(['created', result['provisionDate'] or formatting.blank()]) | ||
| user = None | ||
| if 'billingItem' in result: | ||
| if 'orderItem' in result['billingItem']: | ||
| user = (result['billingItem']['orderItem']['order'] | ||
| ['userRecord']['username']) | ||
| table.add_row(['owner', | ||
| user or formatting.blank()]) | ||
| vlan_table = Table(['type', 'number', 'id']) | ||
|
|
||
| for vlan in result['networkVlans']: | ||
| vlan_table.add_row([ | ||
| vlan['networkSpace'], vlan['vlanNumber'], vlan['id']]) | ||
|
|
@@ -199,6 +215,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerReload(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server reload <identifier> [--key=KEY...] [options] | ||
|
|
||
|
|
@@ -231,6 +248,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class CancelServer(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server cancel <identifier> [options] | ||
|
|
||
|
|
@@ -264,6 +282,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerCancelReasons(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server cancel-reasons | ||
|
|
||
|
|
@@ -286,6 +305,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerPowerOff(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server power-off <identifier> [options] | ||
|
|
||
|
|
@@ -308,6 +328,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerReboot(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server reboot <identifier> [--hard | --soft] [options] | ||
|
|
||
|
|
@@ -340,6 +361,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerPowerOn(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server power-on <identifier> [options] | ||
|
|
||
|
|
@@ -356,6 +378,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerPowerCycle(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server power-cycle <identifier> [options] | ||
|
|
||
|
|
@@ -379,6 +402,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class NicEditServer(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server nic-edit <identifier> (public | private) --speed=SPEED | ||
| [options] | ||
|
|
@@ -403,6 +427,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ListChassisServer(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server list-chassis [options] | ||
|
|
||
|
|
@@ -425,6 +450,7 @@ def execute(self, args): | |
|
|
||
|
|
||
| class ServerCreateOptions(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server create-options <chassis_id> [options] | ||
|
|
||
|
|
@@ -757,6 +783,7 @@ def _generate_windows_code(self, description): | |
|
|
||
|
|
||
| class CreateServer(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server create [--disk=SIZE...] [--key=KEY...] [options] | ||
|
|
||
|
|
@@ -1021,6 +1048,7 @@ def _get_price_id_from_options(self, ds_options, option, value, | |
|
|
||
|
|
||
| class EditServer(environment.CLIRunnable): | ||
|
|
||
| """ | ||
| usage: sl server edit <identifier> [options] | ||
|
|
||
|
|
||