Merge "Add occi.compute.ephemeral_storage.size attribute"
This commit is contained in:
commit
8f3a0de485
|
@ -56,6 +56,10 @@ class OpenStackResourceTemplate(templates.OCCIResourceTemplate):
|
|||
|
||||
attrs = attribute.AttributeCollection({a.name: a for a in attrs})
|
||||
|
||||
# occi attribute is an alias for the OpenStack one
|
||||
attrs["occi.compute.ephemeral_storage.size"] = (
|
||||
attrs["org.openstack.flavor.ephemeral"])
|
||||
|
||||
location = "%s/%s" % (self._location, id)
|
||||
super(OpenStackResourceTemplate, self).__init__(
|
||||
id,
|
||||
|
|
|
@ -73,6 +73,7 @@ class TestOpenStackResourceTemplate(base.TestCase):
|
|||
for attr in [("occi.compute.cores", cores),
|
||||
("occi.compute.memory", memory),
|
||||
("org.openstack.flavor.swap", swap),
|
||||
("occi.compute.ephemeral_storage.size", ephemeral),
|
||||
("org.openstack.flavor.ephemeral", ephemeral),
|
||||
("org.openstack.flavor.disk", disk)]:
|
||||
self.assertEqual(tpl.attributes[attr[0]].default, attr[1])
|
||||
|
|
Loading…
Reference in New Issue