Skip to content

Instantly share code, notes, and snippets.

@sahid
Created January 3, 2014 16:56
Show Gist options
  • Save sahid/8241561 to your computer and use it in GitHub Desktop.
Save sahid/8241561 to your computer and use it in GitHub Desktop.
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index d0e3d87..c14de7d 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -423,6 +423,7 @@ def do_boot(cs, args):
extra_boot_kwargs = utils.get_resource_manager_extra_kwargs(do_boot, args)
boot_kwargs.update(extra_boot_kwargs)
+ print("output from cs.servers.create()...")
server = cs.servers.create(*boot_args, **boot_kwargs)
_print_server(cs, args, server)
output from cs.servers.create()...
+--------------------------------------+------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | rB2vAGhc8suV |
| config_drive | |
| created | 2014-01-03T16:51:05Z |
| flavor | m1.tiny (10) |
| hostId | |
| id | aafe902c-f7ee-46ee-93fb-ee676336c3c6 |
| image | CirrOS v0.3.0 (fea499e3-16ea-402d-9b53-059a63184ed8) |
| key_name | None |
| metadata | {} |
| name | test1 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | c0a5264585074528a92a9e8665402a0c |
| updated | 2014-01-03T16:51:05Z |
| user_id | 75d097db484449fa8159b7f832acb70a |
+--------------------------------------+------------------------------------------------------+
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index d0e3d87..6cfcb24 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -423,7 +423,9 @@ def do_boot(cs, args):
extra_boot_kwargs = utils.get_resource_manager_extra_kwargs(do_boot, args)
boot_kwargs.update(extra_boot_kwargs)
+ print("output from cs.servers.create() merged with cs.servers.get()...")
server = cs.servers.create(*boot_args, **boot_kwargs)
+ server._info.update(cs.servers.get(server._info['id'])._info)
_print_server(cs, args, server)
if args.poll:
output from cs.servers.create() merged with cs.servers.get()...
+--------------------------------------+------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | mg2oyw7G83WU |
| config_drive | |
| created | 2014-01-03T16:55:32Z |
| flavor | m1.tiny (10) |
| hostId | |
| id | 19607cd0-ecc5-4633-918c-1c74a45e7d2a |
| image | CirrOS v0.3.0 (fea499e3-16ea-402d-9b53-059a63184ed8) |
| key_name | None |
| metadata | {} |
| name | test3 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | c0a5264585074528a92a9e8665402a0c |
| updated | 2014-01-03T16:55:32Z |
| user_id | 75d097db484449fa8159b7f832acb70a |
+--------------------------------------+------------------------------------------------------+
diff --git a/novaclient/v1_1/shell.py b/novaclient/v1_1/shell.py
index d0e3d87..df492cc 100644
--- a/novaclient/v1_1/shell.py
+++ b/novaclient/v1_1/shell.py
@@ -423,7 +423,9 @@ def do_boot(cs, args):
extra_boot_kwargs = utils.get_resource_manager_extra_kwargs(do_boot, args)
boot_kwargs.update(extra_boot_kwargs)
+ print("output from cs.servers.get()...")
server = cs.servers.create(*boot_args, **boot_kwargs)
+ server = cs.servers.get(server._info['id'])
_print_server(cs, args, server)
if args.poll:
output from cs.servers.get()...
+--------------------------------------+------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2014-01-03T16:53:49Z |
| flavor | m1.tiny (10) |
| hostId | |
| id | 89a86ab6-88ab-4f50-ab05-405aa5ecec1d |
| image | CirrOS v0.3.0 (fea499e3-16ea-402d-9b53-059a63184ed8) |
| key_name | None |
| metadata | {} |
| name | test2 |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| status | BUILD |
| tenant_id | c0a5264585074528a92a9e8665402a0c |
| updated | 2014-01-03T16:53:49Z |
| user_id | 75d097db484449fa8159b7f832acb70a |
+--------------------------------------+------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment