~ubuntu-branches/ubuntu/vivid/ironic/vivid-updates

« back to all changes in this revision

Viewing changes to ironic/api/controllers/v1/port.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2015-03-30 11:14:57 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20150330111457-kr4ju3guf22m4vbz
Tags: 2015.1~b3-0ubuntu1
* New upstream release.
  + d/control: 
    - Align with upstream dependencies.
    - Add dh-python to build-dependencies.
    - Add psmisc as a dependency. (LP: #1358820)
  + d/p/fix-requirements.patch: Rediffed.
  + d/ironic-conductor.init.in: Fixed typos in LSB headers,
    thanks to JJ Asghar. (LP: #1429962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                      link.Link.make_link('bookmark', url,
120
120
                                          'ports', port.uuid,
121
121
                                          bookmark=True)
122
 
                     ]
 
122
                      ]
123
123
        return port
124
124
 
125
125
    @classmethod
258
258
        :param sort_key: column to sort results by. Default: id.
259
259
        :param sort_dir: direction to sort. "asc" or "desc". Default: asc.
260
260
        """
261
 
        # NOTE(lucasagomes): /detail should only work agaist collections
 
261
        # NOTE(lucasagomes): /detail should only work against collections
262
262
        parent = pecan.request.path.split('/')[:-1][-1]
263
263
        if parent != "ports":
264
264
            raise exception.HTTPNotFound
349
349
        """
350
350
        if self.from_nodes:
351
351
            raise exception.OperationNotPermitted
352
 
 
353
352
        rpc_port = objects.Port.get_by_uuid(pecan.request.context,
354
353
                                            port_uuid)
355
 
        rpc_port.destroy()
 
354
        rpc_node = objects.Node.get_by_id(pecan.request.context,
 
355
                                          rpc_port.node_id)
 
356
        topic = pecan.request.rpcapi.get_topic_for(rpc_node)
 
357
        pecan.request.rpcapi.destroy_port(pecan.request.context,
 
358
                                          rpc_port, topic)