deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [4/5] Added initial OpenStack unit tests
Date Thu, 30 Aug 2012 09:51:44 GMT
http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/fixtures/test_0005_must_allow_to_create_and_destroy_key.yml
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/fixtures/test_0005_must_allow_to_create_and_destroy_key.yml b/server/tests/drivers/openstack/fixtures/test_0005_must_allow_to_create_and_destroy_key.yml
new file mode 100644
index 0000000..9ce96fb
--- /dev/null
+++ b/server/tests/drivers/openstack/fixtures/test_0005_must_allow_to_create_and_destroy_key.yml
@@ -0,0 +1,690 @@
+---
+http_interactions:
+- request:
+    method: post
+    uri: http://10.34.32.211:5000/v2.0/tokens
+    body:
+      encoding: UTF-8
+      string: ! '{"auth":{"passwordCredentials":{"username":"admin","password":"password"},"tenantName":"admin"}}'
+    headers:
+      Content-Type:
+      - application/json
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Content-Type:
+      - application/json
+      Vary:
+      - X-Auth-Token
+      Content-Length:
+      - '2010'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+    body:
+      encoding: US-ASCII
+      string: ! '{"access": {"token": {"expires": "2012-08-28T16:16:38Z", "id": "f0880474a81e4157b54d76758642b135",
+        "tenant": {"description": null, "enabled": true, "id": "e827289fd66f4effb5b9b5012282fdb7",
+        "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "volume", "name": "Volume Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:9292/v1", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:9292/v1", "internalURL": "http://10.34.32.211:9292/v1"}],
+        "endpoints_links": [], "type": "image", "name": "Image Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "compute", "name": "Compute Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8773/services/Admin", "region": "RegionOne",
+        "publicURL": "http://10.34.32.211:8773/services/Cloud", "internalURL": "http://10.34.32.211:8773/services/Cloud"}],
+        "endpoints_links": [], "type": "ec2", "name": "EC2 Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:35357/v2.0", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:5000/v2.0", "internalURL": "http://10.34.32.211:5000/v2.0"}],
+        "endpoints_links": [], "type": "identity", "name": "Identity Service"}], "user":
+        {"username": "admin", "roles_links": [], "id": "f2286a51122345cea7d216c120974b41",
+        "roles": [{"id": "e7e292b28c4b4befb06232fa935a3c48", "name": "KeystoneServiceAdmin"},
+        {"id": "7e716d5a52f348bb9a7fbbc230041b2a", "name": "admin"}, {"id": "bf2113c0cb924b34907521808ed9df13",
+        "name": "KeystoneAdmin"}], "name": "admin"}}}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: get
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/extensions
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      X-Auth-Token:
+      - f0880474a81e4157b54d76758642b135
+      X-Storage-Token:
+      - f0880474a81e4157b54d76758642b135
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      X-Compute-Request-Id:
+      - req-42db8c76-92e0-4b80-8a7f-f8e976f9b8fa
+      Content-Type:
+      - application/json
+      Content-Length:
+      - '8365'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ! '{"extensions": [{"updated": "2011-12-21T00:00:00+00:00", "name":
+        "ServerDiagnostics", "links": [], "namespace": "http://docs.openstack.org/compute/ext/server-diagnostics/api/v1.1",
+        "alias": "os-server-diagnostics", "description": "Allow Admins to view server
+        diagnostics through server action"}, {"updated": "2011-06-29T00:00:00+00:00",
+        "name": "Hosts", "links": [], "namespace": "http://docs.openstack.org/compute/ext/hosts/api/v1.1",
+        "alias": "os-hosts", "description": "Admin-only host administration"}, {"updated":
+        "2011-07-19T00:00:00+00:00", "name": "SchedulerHints", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/scheduler-hints/api/v2", "alias": "os-scheduler-hints",
+        "description": "Pass arbitrary key/value pairs to the scheduler"}, {"updated":
+        "2011-08-08T00:00:00+00:00", "name": "Quotas", "links": [], "namespace": "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1",
+        "alias": "os-quota-sets", "description": "Quotas management support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Floating_ip_dns", "links": [], "namespace":
+        "http://docs.openstack.org/ext/floating_ip_dns/api/v1.1", "alias": "os-floating-ip-dns",
+        "description": "Floating IP DNS support"}, {"updated": "2011-09-14T00:00:00+00:00",
+        "name": "FlavorExtraData", "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1",
+        "alias": "OS-FLV-EXT-DATA", "description": "Provide additional data for flavors"},
+        {"updated": "2011-06-23T00:00:00+00:00", "name": "FlavorExtraSpecs", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_specs/api/v1.1",
+        "alias": "os-flavor-extra-specs", "description": "Instance type (flavor) extra
+        specs"}, {"updated": "2011-08-17T00:00:00+00:00", "name": "VirtualInterfaces",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/virtual_interfaces/api/v1.1",
+        "alias": "virtual_interfaces", "description": "Virtual interface support"},
+        {"updated": "2011-12-23T00:00:00+00:00", "name": "Accounts", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/accounts/api/v1.1", "alias":
+        "os-accounts", "description": "Admin-only access to accounts"}, {"updated":
+        "2011-03-25T00:00:00+00:00", "name": "Volumes", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/volumes/api/v1.1", "alias": "os-volumes",
+        "description": "Volumes support"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedStatus", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-STS", "description": "Extended Status support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Consoles", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-consoles/api/v2", "alias": "os-consoles",
+        "description": "Interactive Console support."}, {"updated": "2011-07-21T00:00:00+00:00",
+        "name": "SecurityGroups", "links": [], "namespace": "http://docs.openstack.org/compute/ext/securitygroups/api/v1.1",
+        "alias": "security_groups", "description": "Security group support"}, {"updated":
+        "2012-01-12T00:00:00+00:00", "name": "Aggregates", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/aggregates/api/v1.1", "alias": "os-aggregates",
+        "description": "Admin-only aggregate administration"}, {"updated": "2011-07-19T00:00:00+00:00",
+        "name": "Createserverext", "links": [], "namespace": "http://docs.openstack.org/compute/ext/createserverext/api/v1.1",
+        "alias": "os-create-server-ext", "description": "Extended support to the Create
+        Server v1.1 API"}, {"updated": "2011-09-01T00:00:00+00:00", "name": "DeferredDelete",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/deferred-delete/api/v1.1",
+        "alias": "os-deferred-delete", "description": "Instance deferred delete"},
+        {"updated": "2011-09-27T00:00:00+00:00", "name": "DiskConfig", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/disk_config/api/v1.1",
+        "alias": "OS-DCF", "description": "Disk Management Extension"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Networks", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/networks/api/v1.1", "alias": "os-networks",
+        "description": "Admin-only Network Management Extension"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedServerAttributes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-SRV-ATTR", "description": "Extended Server Attributes support."},
+        {"updated": "2011-08-08T00:00:00+00:00", "name": "Keypairs", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/keypairs/api/v1.1", "alias":
+        "os-keypairs", "description": "Keypair Support"}, {"updated": "2011-08-24T00:00:00+00:00",
+        "name": "VolumeTypes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/volume_types/api/v1.1",
+        "alias": "os-volume-types", "description": "Volume types support"}, {"updated":
+        "2011-09-20T00:00:00+00:00", "name": "AdminActions", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/admin-actions/api/v1.1", "alias": "os-admin-actions",
+        "description": "Enable admin-only server actions\n\n    Actions include: pause,
+        unpause, suspend, resume, migrate,\n    resetNetwork, injectNetworkInfo, lock,
+        unlock, createBackup\n    "}, {"updated": "2012-01-04T00:00:00+00:00", "name":
+        "Floating_ip_pools", "links": [], "namespace": "http://docs.openstack.org/compute/ext/floating_ip_pools/api/v1.1",
+        "alias": "os-floating-ip-pools", "description": "Floating IPs support"}, {"updated":
+        "2012-01-23T00:00:00+00:00", "name": "ServerStartStop", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/servers/api/v1.1", "alias": "os-server-start-stop",
+        "description": "Start/Stop instance compute API support"}, {"updated": "2012-01-19T00:00:00+00:00",
+        "name": "Certificates", "links": [], "namespace": "http://docs.openstack.org/compute/ext/certificates/api/v1.1",
+        "alias": "os-certificates", "description": "Certificates support"}, {"updated":
+        "2011-12-08T00:00:00+00:00", "name": "Console_output", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-console-output/api/v2", "alias":
+        "os-console-output", "description": "Console log output support, with tailing
+        ability."}, {"updated": "2012-01-19T00:00:00+00:00", "name": "FlavorManage",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_manage/api/v1.1",
+        "alias": "os-flavor-manage", "description": "\n    Flavor create/delete API
+        support\n    "}, {"updated": "2011-12-16T00:00:00+00:00", "name": "Cloudpipe",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/cloudpipe/api/v1.1",
+        "alias": "os-cloudpipe", "description": "Adds actions to create cloudpipe
+        instances.\n\n    When running with the Vlan network mode, you need a mechanism
+        to route\n    from the public Internet to your vlans.  This mechanism is known
+        as a\n    cloudpipe.\n\n    At the time of creating this class, only OpenVPN
+        is supported.  Support for\n    a SSH Bastion host is forthcoming.\n    "},
+        {"updated": "2011-06-09T00:00:00+00:00", "name": "Multinic", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/multinic/api/v1.1", "alias":
+        "NMN", "description": "Multiple network support"}, {"updated": "2011-08-08T00:00:00+00:00",
+        "name": "Users", "links": [], "namespace": "http://docs.openstack.org/compute/ext/users/api/v1.1",
+        "alias": "os-users", "description": "Allow admins to acces user information"},
+        {"updated": "2011-08-19T00:00:00+00:00", "name": "SimpleTenantUsage", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/os-simple-tenant-usage/api/v1.1",
+        "alias": "os-simple-tenant-usage", "description": "Simple tenant usage extension"},
+        {"updated": "2011-12-21T00:00:00+00:00", "name": "ServerActionList", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/server-actions-list/api/v1.1",
+        "alias": "os-server-action-list", "description": "Allow Admins to view pending
+        server actions"}, {"updated": "2011-08-18T00:00:00+00:00", "name": "Rescue",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/rescue/api/v1.1",
+        "alias": "os-rescue", "description": "Instance rescue mode"}, {"updated":
+        "2011-06-16T00:00:00+00:00", "name": "Floating_ips", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/floating_ips/api/v1.1", "alias": "os-floating-ips",
+        "description": "Floating IPs support"}]}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: post
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/os-keypairs
+    body:
+      encoding: UTF-8
+      string: ! '{"keypair":{"name":"test-unit-1"}}'
+    headers:
+      X-Auth-Token:
+      - f0880474a81e4157b54d76758642b135
+      X-Storage-Token:
+      - f0880474a81e4157b54d76758642b135
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      X-Compute-Request-Id:
+      - req-8757fa64-3f58-41ed-99cd-6b3c99ba960b
+      Content-Type:
+      - application/json
+      Content-Length:
+      - '1343'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ! '{"keypair": {"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDE8axljiZF17C1vlIijELVhRz1e9Zxjekg36OYAC/5lYEhFXyydvH0oYr/A4runqFrg+656Kuz2DPS4rgLQ7tHT6vm/2yBsJIPP1Z7GrEw/fv89OuH0wvkRlg7ILS2rfhS9rx0l2N2RqQGkqLPpO/+s1uvY7Kzr8jnJPeXhi5Y5Q==
+        nova@openstack-01.lab.eng.brq.redhat.com\n", "private_key": "-----BEGIN RSA
+        PRIVATE KEY-----\nMIICXAIBAAKBgQDE8axljiZF17C1vlIijELVhRz1e9Zxjekg36OYAC/5lYEhFXyy\ndvH0oYr/A4runqFrg+656Kuz2DPS4rgLQ7tHT6vm/2yBsJIPP1Z7GrEw/fv89OuH\n0wvkRlg7ILS2rfhS9rx0l2N2RqQGkqLPpO/+s1uvY7Kzr8jnJPeXhi5Y5QIDAQAB\nAoGAH7Qf4oFNm/Sq17b5leIqaCDzlnkG/mSv4MDfnvp4vp7YmLDS0A/hx1WyAHdb\niCo1Jg+pAHh6G4t0XEBvDDEtFndRex/MJ//+3CqXHxutFDGcO5EsQVc6uUPrW6Sq\n9AWU/50p3WFMKA3pqnfCN0KslUUqgoLlOshrBgIw0Vcg0AkCQQDs4EjAgFEnxtxk\nSxhfZQL9DzxFEO2DLSbMebGBWZI6JizPVUE6JzYz1LnHtcKV8HFArDW4CQdR4QZR\nwKjyNk8fAkEA1NgUb5Fks4dM1TzxZJGIi52SA8SbGdqN8uPWiw5Au58ppOqb3xEG\nas2LKzHLX/ORGAkFvrFyL9rQJkd+CVALewJAP5aB0TNhFdV7am0CUPFz2O0TF9NQ\nfytKxA9TCE88QuHmm43eYbcPBODxMlxnrQqLzHmuPgYmceN/Z8jZUZQkrwJAZFc5\nyx8QClLOtfh1FKRHawptu7kEJbwTD1651fRyMAFo8IZp1U+BZvhfk412A1YgIOSg\nALZGzqipWGJ72IgT4QJBAJViYQhDEY3hfIOsaCsuns83ujZBcrY/hEathJCanm9+\ngoeHZFTSnq1nieOeRlqa2XR1iGObNn+udtF6P1DJQKM=\n-----END
+        RSA PRIVATE KEY-----\n", "user_id": "f2286a51122345cea7d216c120974b41", "name":
+        "test-unit-1", "fingerprint": "52:89:bc:c6:f4:d7:e6:1b:7a:6c:e7:90:d8:91:a5:9e"}}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: post
+    uri: http://10.34.32.211:5000/v2.0/tokens
+    body:
+      encoding: UTF-8
+      string: ! '{"auth":{"passwordCredentials":{"username":"admin","password":"password"},"tenantName":"admin"}}'
+    headers:
+      Content-Type:
+      - application/json
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Content-Type:
+      - application/json
+      Vary:
+      - X-Auth-Token
+      Content-Length:
+      - '2010'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+    body:
+      encoding: US-ASCII
+      string: ! '{"access": {"token": {"expires": "2012-08-28T16:16:38Z", "id": "8a15c65455d34169ab239a4afb115b7f",
+        "tenant": {"description": null, "enabled": true, "id": "e827289fd66f4effb5b9b5012282fdb7",
+        "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "volume", "name": "Volume Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:9292/v1", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:9292/v1", "internalURL": "http://10.34.32.211:9292/v1"}],
+        "endpoints_links": [], "type": "image", "name": "Image Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "compute", "name": "Compute Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8773/services/Admin", "region": "RegionOne",
+        "publicURL": "http://10.34.32.211:8773/services/Cloud", "internalURL": "http://10.34.32.211:8773/services/Cloud"}],
+        "endpoints_links": [], "type": "ec2", "name": "EC2 Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:35357/v2.0", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:5000/v2.0", "internalURL": "http://10.34.32.211:5000/v2.0"}],
+        "endpoints_links": [], "type": "identity", "name": "Identity Service"}], "user":
+        {"username": "admin", "roles_links": [], "id": "f2286a51122345cea7d216c120974b41",
+        "roles": [{"id": "e7e292b28c4b4befb06232fa935a3c48", "name": "KeystoneServiceAdmin"},
+        {"id": "7e716d5a52f348bb9a7fbbc230041b2a", "name": "admin"}, {"id": "bf2113c0cb924b34907521808ed9df13",
+        "name": "KeystoneAdmin"}], "name": "admin"}}}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: get
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/extensions
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      X-Auth-Token:
+      - 8a15c65455d34169ab239a4afb115b7f
+      X-Storage-Token:
+      - 8a15c65455d34169ab239a4afb115b7f
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      X-Compute-Request-Id:
+      - req-03ccf4cb-3de9-4428-875f-ec62f0e49162
+      Content-Type:
+      - application/json
+      Content-Length:
+      - '8365'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ! '{"extensions": [{"updated": "2011-12-21T00:00:00+00:00", "name":
+        "ServerDiagnostics", "links": [], "namespace": "http://docs.openstack.org/compute/ext/server-diagnostics/api/v1.1",
+        "alias": "os-server-diagnostics", "description": "Allow Admins to view server
+        diagnostics through server action"}, {"updated": "2011-06-29T00:00:00+00:00",
+        "name": "Hosts", "links": [], "namespace": "http://docs.openstack.org/compute/ext/hosts/api/v1.1",
+        "alias": "os-hosts", "description": "Admin-only host administration"}, {"updated":
+        "2011-07-19T00:00:00+00:00", "name": "SchedulerHints", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/scheduler-hints/api/v2", "alias": "os-scheduler-hints",
+        "description": "Pass arbitrary key/value pairs to the scheduler"}, {"updated":
+        "2011-08-08T00:00:00+00:00", "name": "Quotas", "links": [], "namespace": "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1",
+        "alias": "os-quota-sets", "description": "Quotas management support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Floating_ip_dns", "links": [], "namespace":
+        "http://docs.openstack.org/ext/floating_ip_dns/api/v1.1", "alias": "os-floating-ip-dns",
+        "description": "Floating IP DNS support"}, {"updated": "2011-09-14T00:00:00+00:00",
+        "name": "FlavorExtraData", "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1",
+        "alias": "OS-FLV-EXT-DATA", "description": "Provide additional data for flavors"},
+        {"updated": "2011-06-23T00:00:00+00:00", "name": "FlavorExtraSpecs", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_specs/api/v1.1",
+        "alias": "os-flavor-extra-specs", "description": "Instance type (flavor) extra
+        specs"}, {"updated": "2011-08-17T00:00:00+00:00", "name": "VirtualInterfaces",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/virtual_interfaces/api/v1.1",
+        "alias": "virtual_interfaces", "description": "Virtual interface support"},
+        {"updated": "2011-12-23T00:00:00+00:00", "name": "Accounts", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/accounts/api/v1.1", "alias":
+        "os-accounts", "description": "Admin-only access to accounts"}, {"updated":
+        "2011-03-25T00:00:00+00:00", "name": "Volumes", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/volumes/api/v1.1", "alias": "os-volumes",
+        "description": "Volumes support"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedStatus", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-STS", "description": "Extended Status support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Consoles", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-consoles/api/v2", "alias": "os-consoles",
+        "description": "Interactive Console support."}, {"updated": "2011-07-21T00:00:00+00:00",
+        "name": "SecurityGroups", "links": [], "namespace": "http://docs.openstack.org/compute/ext/securitygroups/api/v1.1",
+        "alias": "security_groups", "description": "Security group support"}, {"updated":
+        "2012-01-12T00:00:00+00:00", "name": "Aggregates", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/aggregates/api/v1.1", "alias": "os-aggregates",
+        "description": "Admin-only aggregate administration"}, {"updated": "2011-07-19T00:00:00+00:00",
+        "name": "Createserverext", "links": [], "namespace": "http://docs.openstack.org/compute/ext/createserverext/api/v1.1",
+        "alias": "os-create-server-ext", "description": "Extended support to the Create
+        Server v1.1 API"}, {"updated": "2011-09-01T00:00:00+00:00", "name": "DeferredDelete",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/deferred-delete/api/v1.1",
+        "alias": "os-deferred-delete", "description": "Instance deferred delete"},
+        {"updated": "2011-09-27T00:00:00+00:00", "name": "DiskConfig", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/disk_config/api/v1.1",
+        "alias": "OS-DCF", "description": "Disk Management Extension"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Networks", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/networks/api/v1.1", "alias": "os-networks",
+        "description": "Admin-only Network Management Extension"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedServerAttributes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-SRV-ATTR", "description": "Extended Server Attributes support."},
+        {"updated": "2011-08-08T00:00:00+00:00", "name": "Keypairs", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/keypairs/api/v1.1", "alias":
+        "os-keypairs", "description": "Keypair Support"}, {"updated": "2011-08-24T00:00:00+00:00",
+        "name": "VolumeTypes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/volume_types/api/v1.1",
+        "alias": "os-volume-types", "description": "Volume types support"}, {"updated":
+        "2011-09-20T00:00:00+00:00", "name": "AdminActions", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/admin-actions/api/v1.1", "alias": "os-admin-actions",
+        "description": "Enable admin-only server actions\n\n    Actions include: pause,
+        unpause, suspend, resume, migrate,\n    resetNetwork, injectNetworkInfo, lock,
+        unlock, createBackup\n    "}, {"updated": "2012-01-04T00:00:00+00:00", "name":
+        "Floating_ip_pools", "links": [], "namespace": "http://docs.openstack.org/compute/ext/floating_ip_pools/api/v1.1",
+        "alias": "os-floating-ip-pools", "description": "Floating IPs support"}, {"updated":
+        "2012-01-23T00:00:00+00:00", "name": "ServerStartStop", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/servers/api/v1.1", "alias": "os-server-start-stop",
+        "description": "Start/Stop instance compute API support"}, {"updated": "2012-01-19T00:00:00+00:00",
+        "name": "Certificates", "links": [], "namespace": "http://docs.openstack.org/compute/ext/certificates/api/v1.1",
+        "alias": "os-certificates", "description": "Certificates support"}, {"updated":
+        "2011-12-08T00:00:00+00:00", "name": "Console_output", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-console-output/api/v2", "alias":
+        "os-console-output", "description": "Console log output support, with tailing
+        ability."}, {"updated": "2012-01-19T00:00:00+00:00", "name": "FlavorManage",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_manage/api/v1.1",
+        "alias": "os-flavor-manage", "description": "\n    Flavor create/delete API
+        support\n    "}, {"updated": "2011-12-16T00:00:00+00:00", "name": "Cloudpipe",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/cloudpipe/api/v1.1",
+        "alias": "os-cloudpipe", "description": "Adds actions to create cloudpipe
+        instances.\n\n    When running with the Vlan network mode, you need a mechanism
+        to route\n    from the public Internet to your vlans.  This mechanism is known
+        as a\n    cloudpipe.\n\n    At the time of creating this class, only OpenVPN
+        is supported.  Support for\n    a SSH Bastion host is forthcoming.\n    "},
+        {"updated": "2011-06-09T00:00:00+00:00", "name": "Multinic", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/multinic/api/v1.1", "alias":
+        "NMN", "description": "Multiple network support"}, {"updated": "2011-08-08T00:00:00+00:00",
+        "name": "Users", "links": [], "namespace": "http://docs.openstack.org/compute/ext/users/api/v1.1",
+        "alias": "os-users", "description": "Allow admins to acces user information"},
+        {"updated": "2011-08-19T00:00:00+00:00", "name": "SimpleTenantUsage", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/os-simple-tenant-usage/api/v1.1",
+        "alias": "os-simple-tenant-usage", "description": "Simple tenant usage extension"},
+        {"updated": "2011-12-21T00:00:00+00:00", "name": "ServerActionList", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/server-actions-list/api/v1.1",
+        "alias": "os-server-action-list", "description": "Allow Admins to view pending
+        server actions"}, {"updated": "2011-08-18T00:00:00+00:00", "name": "Rescue",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/rescue/api/v1.1",
+        "alias": "os-rescue", "description": "Instance rescue mode"}, {"updated":
+        "2011-06-16T00:00:00+00:00", "name": "Floating_ips", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/floating_ips/api/v1.1", "alias": "os-floating-ips",
+        "description": "Floating IPs support"}]}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: post
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/os-keypairs
+    body:
+      encoding: UTF-8
+      string: ! '{"keypair":{"name":"test-unit-1"}}'
+    headers:
+      X-Auth-Token:
+      - 8a15c65455d34169ab239a4afb115b7f
+      X-Storage-Token:
+      - 8a15c65455d34169ab239a4afb115b7f
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 409
+      message: Conflict
+    headers:
+      Content-Length:
+      - '90'
+      Content-Type:
+      - application/json; charset=UTF-8
+      X-Compute-Request-Id:
+      - req-2a6bc67e-20d2-4cce-bd23-f0c741af1a9c
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ! '{"conflictingRequest": {"message": "Key pair ''test-unit-1'' already
+        exists.", "code": 409}}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: post
+    uri: http://10.34.32.211:5000/v2.0/tokens
+    body:
+      encoding: UTF-8
+      string: ! '{"auth":{"passwordCredentials":{"username":"admin","password":"password"},"tenantName":"admin"}}'
+    headers:
+      Content-Type:
+      - application/json
+      Accept:
+      - ! '*/*'
+      User-Agent:
+      - Ruby
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      Content-Type:
+      - application/json
+      Vary:
+      - X-Auth-Token
+      Content-Length:
+      - '2010'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+    body:
+      encoding: US-ASCII
+      string: ! '{"access": {"token": {"expires": "2012-08-28T16:16:38Z", "id": "d8301f2a04fa4e8598462039eb9cffbd",
+        "tenant": {"description": null, "enabled": true, "id": "e827289fd66f4effb5b9b5012282fdb7",
+        "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8776/v1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "volume", "name": "Volume Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:9292/v1", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:9292/v1", "internalURL": "http://10.34.32.211:9292/v1"}],
+        "endpoints_links": [], "type": "image", "name": "Image Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "region": "RegionOne", "publicURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7",
+        "internalURL": "http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7"}],
+        "endpoints_links": [], "type": "compute", "name": "Compute Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:8773/services/Admin", "region": "RegionOne",
+        "publicURL": "http://10.34.32.211:8773/services/Cloud", "internalURL": "http://10.34.32.211:8773/services/Cloud"}],
+        "endpoints_links": [], "type": "ec2", "name": "EC2 Service"}, {"endpoints":
+        [{"adminURL": "http://10.34.32.211:35357/v2.0", "region": "RegionOne", "publicURL":
+        "http://10.34.32.211:5000/v2.0", "internalURL": "http://10.34.32.211:5000/v2.0"}],
+        "endpoints_links": [], "type": "identity", "name": "Identity Service"}], "user":
+        {"username": "admin", "roles_links": [], "id": "f2286a51122345cea7d216c120974b41",
+        "roles": [{"id": "e7e292b28c4b4befb06232fa935a3c48", "name": "KeystoneServiceAdmin"},
+        {"id": "7e716d5a52f348bb9a7fbbc230041b2a", "name": "admin"}, {"id": "bf2113c0cb924b34907521808ed9df13",
+        "name": "KeystoneAdmin"}], "name": "admin"}}}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: get
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/extensions
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      X-Auth-Token:
+      - d8301f2a04fa4e8598462039eb9cffbd
+      X-Storage-Token:
+      - d8301f2a04fa4e8598462039eb9cffbd
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 200
+      message: OK
+    headers:
+      X-Compute-Request-Id:
+      - req-aa67503f-0501-48a9-8866-fed9195c89d3
+      Content-Type:
+      - application/json
+      Content-Length:
+      - '8365'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ! '{"extensions": [{"updated": "2011-12-21T00:00:00+00:00", "name":
+        "ServerDiagnostics", "links": [], "namespace": "http://docs.openstack.org/compute/ext/server-diagnostics/api/v1.1",
+        "alias": "os-server-diagnostics", "description": "Allow Admins to view server
+        diagnostics through server action"}, {"updated": "2011-06-29T00:00:00+00:00",
+        "name": "Hosts", "links": [], "namespace": "http://docs.openstack.org/compute/ext/hosts/api/v1.1",
+        "alias": "os-hosts", "description": "Admin-only host administration"}, {"updated":
+        "2011-07-19T00:00:00+00:00", "name": "SchedulerHints", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/scheduler-hints/api/v2", "alias": "os-scheduler-hints",
+        "description": "Pass arbitrary key/value pairs to the scheduler"}, {"updated":
+        "2011-08-08T00:00:00+00:00", "name": "Quotas", "links": [], "namespace": "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1",
+        "alias": "os-quota-sets", "description": "Quotas management support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Floating_ip_dns", "links": [], "namespace":
+        "http://docs.openstack.org/ext/floating_ip_dns/api/v1.1", "alias": "os-floating-ip-dns",
+        "description": "Floating IP DNS support"}, {"updated": "2011-09-14T00:00:00+00:00",
+        "name": "FlavorExtraData", "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_data/api/v1.1",
+        "alias": "OS-FLV-EXT-DATA", "description": "Provide additional data for flavors"},
+        {"updated": "2011-06-23T00:00:00+00:00", "name": "FlavorExtraSpecs", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/flavor_extra_specs/api/v1.1",
+        "alias": "os-flavor-extra-specs", "description": "Instance type (flavor) extra
+        specs"}, {"updated": "2011-08-17T00:00:00+00:00", "name": "VirtualInterfaces",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/virtual_interfaces/api/v1.1",
+        "alias": "virtual_interfaces", "description": "Virtual interface support"},
+        {"updated": "2011-12-23T00:00:00+00:00", "name": "Accounts", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/accounts/api/v1.1", "alias":
+        "os-accounts", "description": "Admin-only access to accounts"}, {"updated":
+        "2011-03-25T00:00:00+00:00", "name": "Volumes", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/volumes/api/v1.1", "alias": "os-volumes",
+        "description": "Volumes support"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedStatus", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-STS", "description": "Extended Status support"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Consoles", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-consoles/api/v2", "alias": "os-consoles",
+        "description": "Interactive Console support."}, {"updated": "2011-07-21T00:00:00+00:00",
+        "name": "SecurityGroups", "links": [], "namespace": "http://docs.openstack.org/compute/ext/securitygroups/api/v1.1",
+        "alias": "security_groups", "description": "Security group support"}, {"updated":
+        "2012-01-12T00:00:00+00:00", "name": "Aggregates", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/aggregates/api/v1.1", "alias": "os-aggregates",
+        "description": "Admin-only aggregate administration"}, {"updated": "2011-07-19T00:00:00+00:00",
+        "name": "Createserverext", "links": [], "namespace": "http://docs.openstack.org/compute/ext/createserverext/api/v1.1",
+        "alias": "os-create-server-ext", "description": "Extended support to the Create
+        Server v1.1 API"}, {"updated": "2011-09-01T00:00:00+00:00", "name": "DeferredDelete",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/deferred-delete/api/v1.1",
+        "alias": "os-deferred-delete", "description": "Instance deferred delete"},
+        {"updated": "2011-09-27T00:00:00+00:00", "name": "DiskConfig", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/disk_config/api/v1.1",
+        "alias": "OS-DCF", "description": "Disk Management Extension"}, {"updated":
+        "2011-12-23T00:00:00+00:00", "name": "Networks", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/networks/api/v1.1", "alias": "os-networks",
+        "description": "Admin-only Network Management Extension"}, {"updated": "2011-11-03T00:00:00+00:00",
+        "name": "ExtendedServerAttributes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/extended_status/api/v1.1",
+        "alias": "OS-EXT-SRV-ATTR", "description": "Extended Server Attributes support."},
+        {"updated": "2011-08-08T00:00:00+00:00", "name": "Keypairs", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/keypairs/api/v1.1", "alias":
+        "os-keypairs", "description": "Keypair Support"}, {"updated": "2011-08-24T00:00:00+00:00",
+        "name": "VolumeTypes", "links": [], "namespace": "http://docs.openstack.org/compute/ext/volume_types/api/v1.1",
+        "alias": "os-volume-types", "description": "Volume types support"}, {"updated":
+        "2011-09-20T00:00:00+00:00", "name": "AdminActions", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/admin-actions/api/v1.1", "alias": "os-admin-actions",
+        "description": "Enable admin-only server actions\n\n    Actions include: pause,
+        unpause, suspend, resume, migrate,\n    resetNetwork, injectNetworkInfo, lock,
+        unlock, createBackup\n    "}, {"updated": "2012-01-04T00:00:00+00:00", "name":
+        "Floating_ip_pools", "links": [], "namespace": "http://docs.openstack.org/compute/ext/floating_ip_pools/api/v1.1",
+        "alias": "os-floating-ip-pools", "description": "Floating IPs support"}, {"updated":
+        "2012-01-23T00:00:00+00:00", "name": "ServerStartStop", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/servers/api/v1.1", "alias": "os-server-start-stop",
+        "description": "Start/Stop instance compute API support"}, {"updated": "2012-01-19T00:00:00+00:00",
+        "name": "Certificates", "links": [], "namespace": "http://docs.openstack.org/compute/ext/certificates/api/v1.1",
+        "alias": "os-certificates", "description": "Certificates support"}, {"updated":
+        "2011-12-08T00:00:00+00:00", "name": "Console_output", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/os-console-output/api/v2", "alias":
+        "os-console-output", "description": "Console log output support, with tailing
+        ability."}, {"updated": "2012-01-19T00:00:00+00:00", "name": "FlavorManage",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/flavor_manage/api/v1.1",
+        "alias": "os-flavor-manage", "description": "\n    Flavor create/delete API
+        support\n    "}, {"updated": "2011-12-16T00:00:00+00:00", "name": "Cloudpipe",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/cloudpipe/api/v1.1",
+        "alias": "os-cloudpipe", "description": "Adds actions to create cloudpipe
+        instances.\n\n    When running with the Vlan network mode, you need a mechanism
+        to route\n    from the public Internet to your vlans.  This mechanism is known
+        as a\n    cloudpipe.\n\n    At the time of creating this class, only OpenVPN
+        is supported.  Support for\n    a SSH Bastion host is forthcoming.\n    "},
+        {"updated": "2011-06-09T00:00:00+00:00", "name": "Multinic", "links": [],
+        "namespace": "http://docs.openstack.org/compute/ext/multinic/api/v1.1", "alias":
+        "NMN", "description": "Multiple network support"}, {"updated": "2011-08-08T00:00:00+00:00",
+        "name": "Users", "links": [], "namespace": "http://docs.openstack.org/compute/ext/users/api/v1.1",
+        "alias": "os-users", "description": "Allow admins to acces user information"},
+        {"updated": "2011-08-19T00:00:00+00:00", "name": "SimpleTenantUsage", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/os-simple-tenant-usage/api/v1.1",
+        "alias": "os-simple-tenant-usage", "description": "Simple tenant usage extension"},
+        {"updated": "2011-12-21T00:00:00+00:00", "name": "ServerActionList", "links":
+        [], "namespace": "http://docs.openstack.org/compute/ext/server-actions-list/api/v1.1",
+        "alias": "os-server-action-list", "description": "Allow Admins to view pending
+        server actions"}, {"updated": "2011-08-18T00:00:00+00:00", "name": "Rescue",
+        "links": [], "namespace": "http://docs.openstack.org/compute/ext/rescue/api/v1.1",
+        "alias": "os-rescue", "description": "Instance rescue mode"}, {"updated":
+        "2011-06-16T00:00:00+00:00", "name": "Floating_ips", "links": [], "namespace":
+        "http://docs.openstack.org/compute/ext/floating_ips/api/v1.1", "alias": "os-floating-ips",
+        "description": "Floating IPs support"}]}'
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+- request:
+    method: delete
+    uri: http://10.34.32.211:8774/v1.1/e827289fd66f4effb5b9b5012282fdb7/os-keypairs/test-unit-1
+    body:
+      encoding: US-ASCII
+      string: ''
+    headers:
+      X-Auth-Token:
+      - d8301f2a04fa4e8598462039eb9cffbd
+      X-Storage-Token:
+      - d8301f2a04fa4e8598462039eb9cffbd
+      Connection:
+      - Keep-Alive
+      User-Agent:
+      - OpenStack Ruby API 1.0.3
+      Accept:
+      - application/json
+      Content-Type:
+      - application/json
+  response:
+    status:
+      code: 202
+      message: Accepted
+    headers:
+      Content-Type:
+      - text/html; charset=UTF-8
+      Content-Length:
+      - '0'
+      Date:
+      - Mon, 27 Aug 2012 16:16:38 GMT
+      Connection:
+      - keep-alive
+    body:
+      encoding: US-ASCII
+      string: ''
+    http_version: 
+  recorded_at: Mon, 27 Aug 2012 12:27:56 GMT
+recorded_with: VCR 2.2.4

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/hardware_profiles_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/hardware_profiles_test.rb b/server/tests/drivers/openstack/hardware_profiles_test.rb
new file mode 100644
index 0000000..8c6b0c3
--- /dev/null
+++ b/server/tests/drivers/openstack/hardware_profiles_test.rb
@@ -0,0 +1,46 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'OpenStackDriver HardwareProfiles' do
+
+  before do
+    @driver = Deltacloud::new(:openstack, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown+wrong', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of hardware_profiles' do
+    @driver.hardware_profiles.wont_be_empty
+    @driver.hardware_profiles.first.must_be_kind_of Deltacloud::HardwareProfile
+  end
+
+  it 'must allow to filter hardware_profiles' do
+    hardware_profiles = @driver.hardware_profiles :id => '1'
+    hardware_profiles.wont_be_empty
+    hardware_profiles.must_be_kind_of Array
+    hardware_profiles.size.must_equal 1
+    hardware_profiles.first.name.must_equal '1'
+    @driver.hardware_profiles(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single hardware_profile' do
+    hardware_profile = @driver.hardware_profile :id => '1'
+    hardware_profile.wont_be_nil
+    hardware_profile.name.must_equal '1'
+    hardware_profile.properties.must_be_kind_of Array
+    hardware_profile.properties.wont_be_empty
+    @driver.hardware_profile(:id => 'unknown').must_be_nil
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/images_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/images_test.rb b/server/tests/drivers/openstack/images_test.rb
new file mode 100644
index 0000000..5c3d943
--- /dev/null
+++ b/server/tests/drivers/openstack/images_test.rb
@@ -0,0 +1,50 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'OpenStackDriver Images' do
+
+  before do
+    @driver = Deltacloud::new(:openstack, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown+wrong', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of images' do
+    @driver.images.wont_be_empty
+    @driver.images.first.must_be_kind_of Image
+  end
+
+  it 'must allow to filter images' do
+    images = @driver.images :id => openstack_image_id
+    images.wont_be_empty
+    images.must_be_kind_of Array
+    images.size.must_equal 1
+    images.first.id.must_equal openstack_image_id
+    @driver.images(:owner_id => 'admin').wont_be_empty
+    @driver.images(:owner_id => 'unknown').must_be_empty
+    @driver.images(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single image' do
+    @driver.image(:id => 'unknown').must_be_nil
+    image = @driver.image :id => openstack_image_id
+    image.wont_be_nil
+    image.must_be_kind_of Image
+    image.id.must_equal openstack_image_id
+    image.name.wont_be_empty
+    image.owner_id.wont_be_empty
+    image.state.wont_be_empty
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/instances_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/instances_test.rb b/server/tests/drivers/openstack/instances_test.rb
new file mode 100644
index 0000000..99ec2b0
--- /dev/null
+++ b/server/tests/drivers/openstack/instances_test.rb
@@ -0,0 +1,66 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'OpenStackDriver Instances' do
+
+  before do
+    @driver = Deltacloud::new(:openstack, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown+wrong', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of instances' do
+    @driver.instances.wont_be_empty
+    @driver.instances.first.must_be_kind_of Instance
+  end
+
+# FIXME: The tests above will fail because of incompatibility
+#        in a way how OpenStack handle uuid/id.
+#        Please uncomment these tests if that will be fixed.
+
+=begin
+  it 'must allow to filter instances' do
+    instances = @driver.instances :id => 'fef00348-9991-404c-b0d4-655d18f84345'
+    instances.wont_be_empty
+    instances.must_be_kind_of Array
+    instances.size.must_equal 1
+    puts instances.inspect
+    instances.first.id.must_equal 'fef00348-9991-404c-b0d4-655d18f84345'
+    @driver.instances(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single instance' do
+    instance = @driver.instance :id => 'fef00348-9991-404c-b0d4-655d18f84345'
+    instance.wont_be_nil
+    instance.id.must_equal 'fef00348-9991-404c-b0d4-655d18f84345'
+    instance.name.must_equal 'test-3'
+    instance.state.wont_be_empty
+    instance.owner_id.must_equal 'admin'
+    instance.realm_id.wont_be_empty
+    instance.image_id.wont_be_empty
+    instance.instance_profile.wont_be_nil
+    @driver.instance(:id => 'unknown').must_be_nil
+  end
+
+  it 'must allow to create and destroy an instance' do
+    instance = @driver.create_instance 'bf7ce59a-d9f9-45d4-9313-f45b16436602', :hwp_id => '1'
+    instance.wont_be_nil
+    instance.image_id.must_equal 'bf7ce59a-d9f9-45d4-9313-f45b16436602'
+    instance.name.wont_be_empty
+    instance.wait_for!(@driver, record_retries('inst_launch')) { |i| i.is_running? }
+    puts @driver.destroy_instance(instance.id).inspect
+  end
+=end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/keys_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/keys_test.rb b/server/tests/drivers/openstack/keys_test.rb
new file mode 100644
index 0000000..bb16f09
--- /dev/null
+++ b/server/tests/drivers/openstack/keys_test.rb
@@ -0,0 +1,61 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'OpenStackDriver Keys' do
+
+  before do
+    @driver = Deltacloud::new(:openstack, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown+wrong', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of keys' do
+    @driver.keys.wont_be_empty
+    @driver.keys.first.must_be_kind_of Key
+  end
+
+  it 'must allow to filter keys' do
+    keys = @driver.keys :id => 'test1'
+    keys.wont_be_empty
+    keys.must_be_kind_of Array
+    keys.size.must_equal 1
+    keys.first.name.must_equal 'test1'
+    @driver.keys(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single key' do
+    key = @driver.key :id => 'test2'
+    key.wont_be_nil
+    key.name.must_equal 'test2'
+    key.fingerprint.wont_be_empty
+    key.credential_type.must_equal :key
+    key.state.must_equal 'AVAILABLE'
+    @driver.key(:id => 'unknown').must_be_nil
+  end
+
+  it 'must allow to create and destroy key' do
+    key = @driver.create_key(:key_name => 'test-unit-1')
+    key.wont_be_nil
+    key.id.must_equal 'test-unit-1'
+    key.fingerprint.wont_be_empty
+    key.pem_rsa_key.wont_be_empty
+    key.pem_rsa_key.must_match /^\-\-\-\-\-BEGIN RSA PRIVATE KEY/
+    # Should not allow duplicate keys to be created:
+    lambda {
+      @driver.create_key(:key_name => 'test-unit-1')
+    }.must_raise Deltacloud::ExceptionHandler::BackendError
+    @driver.destroy_key(:id => 'test-unit-1').must_equal true
+  end
+
+end

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fb66c667/server/tests/drivers/openstack/realms_test.rb
----------------------------------------------------------------------
diff --git a/server/tests/drivers/openstack/realms_test.rb b/server/tests/drivers/openstack/realms_test.rb
new file mode 100644
index 0000000..e820f28
--- /dev/null
+++ b/server/tests/drivers/openstack/realms_test.rb
@@ -0,0 +1,46 @@
+require 'minitest/autorun'
+
+require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'api.rb')
+require_relative 'common.rb'
+
+describe 'OpenStackDriver Realms' do
+
+  before do
+    @driver = Deltacloud::new(:openstack, credentials)
+    VCR.insert_cassette __name__
+  end
+
+  after do
+    VCR.eject_cassette
+  end
+
+  it 'must throw error when wrong credentials' do
+    Proc.new do
+      @driver.backend.images(OpenStruct.new(:user => 'unknown+wrong', :password => 'wrong'))
+    end.must_raise Deltacloud::ExceptionHandler::AuthenticationFailure, 'Authentication Failure'
+  end
+
+  it 'must return list of realms' do
+    @driver.realms.wont_be_empty
+    @driver.realms.first.must_be_kind_of Realm
+  end
+
+  it 'must allow to filter realms' do
+    realms = @driver.realms :id => 'default'
+    realms.wont_be_empty
+    realms.must_be_kind_of Array
+    realms.size.must_equal 1
+    realms.first.id.must_equal 'default'
+    @driver.realms(:id => 'unknown').must_be_empty
+  end
+
+  it 'must allow to retrieve single realm' do
+    realm = @driver.realm :id => 'default'
+    realm.wont_be_nil
+    realm.id.must_equal 'default'
+    realm.limit.wont_be_empty
+    realm.state.must_equal 'AVAILABLE'
+    @driver.realm(:id => 'unknown').must_be_nil
+  end
+
+end


Mime
View raw message