summaryrefslogtreecommitdiff
path: root/ironic/api/controllers/v1/volume_connector.py
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2020-07-16 14:41:20 +1200
committerSteve Baker <sbaker@redhat.com>2020-07-20 08:58:32 +1200
commitb1328fa996ba25f3a23d07fed21b314191741fd7 (patch)
treedb10461212cb5117f0a3cf6336d1a481c8d2ad6a /ironic/api/controllers/v1/volume_connector.py
parent5e12d502fe0a023796b9c5a32878318f76124612 (diff)
downloadironic-b1328fa996ba25f3a23d07fed21b314191741fd7.tar.gz
Remove Link type
This type is only used for output response formatting, not for input validation, so it can be replaced with a basic dict equivalent without disruption. This results in fields in WSME types which shouldn't be handled by WSME because they are already in a dict format. This is handled by relaxing the validation in the (ex-WSME) types so that a None type means that WSME shouldn't serialize that attribute. This will allow old style type serialization to be mixed with plain dicts during the transition period. Story: 1651346 Task: 10551 Change-Id: Ifae9bd005fb7cf951b069ade0c92b8d61e095e0f
Diffstat (limited to 'ironic/api/controllers/v1/volume_connector.py')
-rw-r--r--ironic/api/controllers/v1/volume_connector.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ironic/api/controllers/v1/volume_connector.py b/ironic/api/controllers/v1/volume_connector.py
index 2e4f82b58..595798cd8 100644
--- a/ironic/api/controllers/v1/volume_connector.py
+++ b/ironic/api/controllers/v1/volume_connector.py
@@ -87,7 +87,7 @@ class VolumeConnector(base.APIBase):
_set_node_identifiers, mandatory=True)
"""The UUID of the node this volume connector belongs to"""
- links = atypes.wsattr([link.Link], readonly=True)
+ links = None
"""A list containing a self link and associated volume connector links"""
def __init__(self, **kwargs):
@@ -117,13 +117,13 @@ class VolumeConnector(base.APIBase):
@staticmethod
def _convert_with_links(connector, url):
- connector.links = [link.Link.make_link('self', url,
- 'volume/connectors',
- connector.uuid),
- link.Link.make_link('bookmark', url,
- 'volume/connectors',
- connector.uuid,
- bookmark=True)
+ connector.links = [link.make_link('self', url,
+ 'volume/connectors',
+ connector.uuid),
+ link.make_link('bookmark', url,
+ 'volume/connectors',
+ connector.uuid,
+ bookmark=True)
]
return connector