diff --git a/ironic/api/controllers/v1/chassis.py b/ironic/api/controllers/v1/chassis.py index df5f9df78d..4c5ffe5e3a 100644 --- a/ironic/api/controllers/v1/chassis.py +++ b/ironic/api/controllers/v1/chassis.py @@ -222,7 +222,7 @@ class ChassisController(rest.RestController): # /detail should only work against collections parent = pecan.request.path.split('/')[:-1][-1] if parent != "chassis": - raise exception.HTTPNotFound + raise exception.HTTPNotFound() resource_url = '/'.join(['chassis', 'detail']) return self._get_chassis_collection(marker, limit, sort_key, sort_dir, diff --git a/ironic/api/controllers/v1/node.py b/ironic/api/controllers/v1/node.py index 97796183fb..c34cfc1ec5 100644 --- a/ironic/api/controllers/v1/node.py +++ b/ironic/api/controllers/v1/node.py @@ -1168,7 +1168,7 @@ class NodesController(rest.RestController): # /detail should only work against collections parent = pecan.request.path.split('/')[:-1][-1] if parent != "nodes": - raise exception.HTTPNotFound + raise exception.HTTPNotFound() resource_url = '/'.join(['nodes', 'detail']) return self._get_nodes_collection(chassis_uuid, instance_uuid, @@ -1209,7 +1209,7 @@ class NodesController(rest.RestController): of the resource to be returned. """ if self.from_chassis: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() api_utils.check_allow_specify_fields(fields) @@ -1223,7 +1223,7 @@ class NodesController(rest.RestController): :param node: a node within the request body. """ if self.from_chassis: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() # NOTE(deva): get_topic_for checks if node.driver is in the hash ring # and raises NoValidHost if it is not. @@ -1262,7 +1262,7 @@ class NodesController(rest.RestController): :param patch: a json PATCH document to apply to this node. """ if self.from_chassis: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() rpc_node = api_utils.get_rpc_node(node_ident) @@ -1333,7 +1333,7 @@ class NodesController(rest.RestController): :param node_ident: UUID or logical name of a node. """ if self.from_chassis: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() rpc_node = api_utils.get_rpc_node(node_ident) diff --git a/ironic/api/controllers/v1/port.py b/ironic/api/controllers/v1/port.py index 962d03bc56..e8f3abc14e 100644 --- a/ironic/api/controllers/v1/port.py +++ b/ironic/api/controllers/v1/port.py @@ -317,7 +317,7 @@ class PortsController(rest.RestController): # NOTE(lucasagomes): /detail should only work against collections parent = pecan.request.path.split('/')[:-1][-1] if parent != "ports": - raise exception.HTTPNotFound + raise exception.HTTPNotFound() resource_url = '/'.join(['ports', 'detail']) return self._get_ports_collection(node_uuid or node, address, marker, @@ -333,7 +333,7 @@ class PortsController(rest.RestController): of the resource to be returned. """ if self.from_nodes: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() api_utils.check_allow_specify_fields(fields) @@ -347,7 +347,7 @@ class PortsController(rest.RestController): :param port: a port within the request body. """ if self.from_nodes: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() new_port = objects.Port(pecan.request.context, **port.as_dict()) @@ -365,7 +365,7 @@ class PortsController(rest.RestController): :param patch: a json PATCH document to apply to this port. """ if self.from_nodes: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() rpc_port = objects.Port.get_by_uuid(pecan.request.context, port_uuid) try: @@ -407,7 +407,7 @@ class PortsController(rest.RestController): :param port_uuid: UUID of a port. """ if self.from_nodes: - raise exception.OperationNotPermitted + raise exception.OperationNotPermitted() rpc_port = objects.Port.get_by_uuid(pecan.request.context, port_uuid) rpc_node = objects.Node.get_by_id(pecan.request.context,