Merge "Basic resource.prop for ID attributes (image)"

This commit is contained in:
Jenkins
2016-02-15 12:54:56 +00:00
committed by Gerrit Code Review
6 changed files with 9 additions and 9 deletions

View File

@@ -83,7 +83,7 @@ class Proxy(proxy.BaseProxy):
def update_image(self, image, **attrs):
"""Update a image
:param image: Either the id of a image or a
:param image: Either the ID of a image or a
:class:`~openstack.image.v1.image.Image` instance.
:attrs kwargs: The attributes to update on the image represented
by ``value``.

View File

@@ -55,8 +55,8 @@ class Image(resource.Resource):
#: to a Glance node. The API cannot expect users to know the names
#: of images owned by others.
name = resource.prop('name')
#: The ID of the owner, or tenant, of the image.
owner = resource.prop('owner')
#: The ID of the owner, or project, of the image.
owner_id = resource.prop('owner')
#: Properties, if any, that are associated with the image.
properties = resource.prop('properties')
#: Defines whether the image can be deleted.

View File

@@ -92,7 +92,7 @@ class Proxy(proxy.BaseProxy):
def update_image(self, image, **attrs):
"""Update a image
:param image: Either the id of a image or a
:param image: Either the ID of a image or a
:class:`~openstack.image.v2.image.Image` instance.
:attrs kwargs: The attributes to update on the image represented
by ``value``.
@@ -169,7 +169,7 @@ class Proxy(proxy.BaseProxy):
def update_member(self, member, **attrs):
"""Update a member
:param member: Either the id of a member or a
:param member: Either the ID of a member or a
:class:`~openstack.image.v2.member.Member` instance.
:attrs kwargs: The attributes to update on the member represented
by ``value``.

View File

@@ -53,8 +53,8 @@ class Image(resource.Resource):
min_disk = resource.prop('min_disk')
#: The name of the image.
name = resource.prop('name')
#: The ID of the owner, or tenant, of the image.
owner = resource.prop('owner')
#: The ID of the owner, or project, of the image.
owner_id = resource.prop('owner')
#: Properties, if any, that are associated with the image.
properties = resource.prop('properties')
#: Defines whether the image can be deleted.

View File

@@ -62,7 +62,7 @@ class TestImage(testtools.TestCase):
self.assertEqual(EXAMPLE['min_disk'], sot.min_disk)
self.assertEqual(EXAMPLE['min_ram'], sot.min_ram)
self.assertEqual(EXAMPLE['name'], sot.name)
self.assertEqual(EXAMPLE['owner'], sot.owner)
self.assertEqual(EXAMPLE['owner'], sot.owner_id)
self.assertEqual(EXAMPLE['properties'], sot.properties)
self.assertEqual(EXAMPLE['protected'], sot.protected)
self.assertEqual(EXAMPLE['size'], sot.size)

View File

@@ -58,7 +58,7 @@ class TestImage(testtools.TestCase):
self.assertEqual(EXAMPLE['disk_format'], sot.disk_format)
self.assertEqual(EXAMPLE['min_disk'], sot.min_disk)
self.assertEqual(EXAMPLE['name'], sot.name)
self.assertEqual(EXAMPLE['owner'], sot.owner)
self.assertEqual(EXAMPLE['owner'], sot.owner_id)
self.assertEqual(EXAMPLE['properties'], sot.properties)
self.assertEqual(EXAMPLE['protected'], sot.protected)
self.assertEqual(EXAMPLE['status'], sot.status)