diff --git a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java index 23f86b6b35..d05515702a 100644 --- a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java +++ b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/_NovaClient.java @@ -36,12 +36,12 @@ public class _NovaClient { TemplateOptions options = new TemplateOptions(); //options.authorizePublicKey(""); - Template template = cs.templateBuilder().hardwareId("m1.small").imageId("13").options(options).build(); - /*try { - cs.runNodesWithTag("test", 1, template); - } catch (RunNodesException e) { - e.printStackTrace(); - }*/ + //Template template = cs.templateBuilder().hardwareId("m1.small").imageId("13").options(options).build(); + //try { + // cs.runNodesWithTag("test", 1, template); + //} catch (RunNodesException e) { + // e.printStackTrace(); + //} //System.out.println(cs.listNodes()); //System.out.println(cs.listImages()); diff --git a/sandbox-apis/nova/src/test/resources/test_list_images.json b/sandbox-apis/nova/src/test/resources/test_list_images.json index 0c5cb251ad..5584d7cf83 100644 --- a/sandbox-apis/nova/src/test/resources/test_list_images.json +++ b/sandbox-apis/nova/src/test/resources/test_list_images.json @@ -1,12 +1,46 @@ -{ - "images" : [ - { - "id" : 2, - "name" : "CentOS 5.2" - }, - { - "id" : 743, - "name" : "My Server Backup" - } - ] -} +{ + "images" : { + "values" : [ + { + "id" : 1, + "name" : "CentOS 5.2", + "links": [ + { + "rel" : "self", + "href" : "http://servers.api.openstack.org/v1.1/1234/images/1" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+xml", + "href" : "http://servers.api.openstack.org/1234/images/1" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+json", + "href" : "http://servers.api.openstack.org/1234/images/1" + } + ] + }, + { + "id" : 743, + "name" : "My Server Backup", + "links": [ + { + "rel" : "self", + "href" : "http://servers.api.openstack.org/v1.1/1234/images/743" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+xml", + "href" : "http://servers.api.openstack.org/1234/images/743" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+json", + "href" : "http://servers.api.openstack.org/1234/images/743" + } + ] + } + ] + } +} diff --git a/sandbox-apis/nova/src/test/resources/test_list_images_detail.json b/sandbox-apis/nova/src/test/resources/test_list_images_detail.json index bdafc2ded3..722d1936d8 100644 --- a/sandbox-apis/nova/src/test/resources/test_list_images_detail.json +++ b/sandbox-apis/nova/src/test/resources/test_list_images_detail.json @@ -1,20 +1,60 @@ -{ - "images" : [ - { - "id" : 2, - "name" : "CentOS 5.2", - "updated" : "2010-10-10T12:00:00Z", - "created" : "2010-08-10T12:00:00Z", - "status" : "ACTIVE" - }, - { - "id" : 743, - "name" : "My Server Backup", - "serverId" : 12, - "updated" : "2010-10-10T12:00:00Z", - "created" : "2009-07-07T09:56:16-05:00", - "status" : "SAVING", - "progress" : 80 - } - ] -} +{ + "images" : { + "values" : [ + { + "id" : 1, + "name" : "CentOS 5.2", + "updated" : "2010-10-10T12:00:00Z", + "created" : "2010-08-10T12:00:00Z", + "status" : "ACTIVE", + "metadata" : { + "values" : { + "ImageType" : "Gold", + "ImageVersion" : "1.5" + } + }, + "links": [ + { + "rel" : "self", + "href" : "http://servers.api.openstack.org/v1.1/1234/images/1" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+xml", + "href" : "http://servers.api.openstack.org/1234/images/1" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+json", + "href" : "http://servers.api.openstack.org/1234/images/1" + } + ] + }, + { + "id" : 743, + "name" : "My Server Backup", + "serverRef" : "http://servers.api.openstack.org/v1.1/1234/servers/12", + "updated" : "2010-10-10T12:00:00Z", + "created" : "2010-08-10T12:00:00Z", + "status" : "SAVING", + "progress" : 80, + "links": [ + { + "rel" : "self", + "href" : "http://servers.api.openstack.org/v1.1/1234/images/743" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+xml", + "href" : "http://servers.api.openstack.org/1234/images/743" + }, + { + "rel" : "bookmark", + "type" : "application/vnd.openstack.compute-v1.1+json", + "href" : "http://servers.api.openstack.org/1234/images/743" + } + ] + } + ] + } +}