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

« back to all changes in this revision

Viewing changes to ironic/conductor/rpcapi.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:
66
66
    |           get_driver_vendor_passthru_methods
67
67
    |    1.22 - Added configdrive parameter to do_node_deploy.
68
68
    |    1.23 - Added do_provisioning_action
 
69
    |    1.24 - Added inspect_hardware method
 
70
    |    1.25 - Added destroy_port
 
71
    |    1.26 - Added continue_node_clean
69
72
 
70
73
    """
71
74
 
72
75
    # NOTE(rloo): This must be in sync with manager.ConductorManager's.
73
 
    RPC_API_VERSION = '1.23'
 
76
    RPC_API_VERSION = '1.26'
74
77
 
75
78
    def __init__(self, topic=None):
76
79
        super(ConductorAPI, self).__init__()
323
326
        return cctxt.call(context, 'do_provisioning_action',
324
327
                          node_id=node_id, action=action)
325
328
 
 
329
    def continue_node_clean(self, context, node_id, topic=None):
 
330
        """Signal to conductor service to start the next cleaning action.
 
331
 
 
332
        :param context: request context.
 
333
        :param node_id: node id or uuid.
 
334
        :param topic: RPC topic. Defaults to self.topic.
 
335
        :raises: NoFreeConductorWorker when there is no free worker to start
 
336
                async task.
 
337
        :raises: InvalidStateRequested if the requested action can not
 
338
                 be performed.
 
339
        :raises: NodeLocked if node is locked by another conductor.
 
340
        :raises: NodeNotFound if the node no longer appears in the database
 
341
        """
 
342
        cctxt = self.client.prepare(topic=topic or self.topic, version='1.26')
 
343
        return cctxt.call(context, 'continue_node_clean',
 
344
                          node_id=node_id)
 
345
 
326
346
    def validate_driver_interfaces(self, context, node_id, topic=None):
327
347
        """Validate the `core` and `standardized` interfaces for drivers.
328
348
 
483
503
        cctxt = self.client.prepare(topic=topic or self.topic, version='1.17')
484
504
        return cctxt.call(context, 'get_supported_boot_devices',
485
505
                          node_id=node_id)
 
506
 
 
507
    def inspect_hardware(self, context, node_id, topic=None):
 
508
        """Signals the conductor service to perform hardware introspection.
 
509
 
 
510
        :param context: request context.
 
511
        :param node_id: node id or uuid.
 
512
        :param topic: RPC topic. Defaults to self.topic.
 
513
        :raises: NodeLocked if node is locked by another conductor.
 
514
        :raises: HardwareInspectionFailure
 
515
        :raises: NoFreeConductorWorker when there is no free worker to start
 
516
                 async task.
 
517
        :raises: UnsupportedDriverExtension if the node's driver doesn't
 
518
                 support inspection.
 
519
        :raises: InvalidStateRequested if 'inspect' is not a valid
 
520
                 action to do in the current state.
 
521
 
 
522
        """
 
523
        cctxt = self.client.prepare(topic=topic or self.topic, version='1.24')
 
524
        return cctxt.call(context, 'inspect_hardware', node_id=node_id)
 
525
 
 
526
    def destroy_port(self, context, port, topic=None):
 
527
        """Delete a port.
 
528
 
 
529
        :param context: request context.
 
530
        :param port: port object
 
531
        :param topic: RPC topic. Defaults to self.topic.
 
532
        :raises: NodeLocked if node is locked by another conductor.
 
533
        :raises: NodeNotFound if the node associated with the port does not
 
534
                 exist.
 
535
        """
 
536
        cctxt = self.client.prepare(topic=topic or self.topic, version='1.25')
 
537
        return cctxt.call(context, 'destroy_port', port=port)