Seamicro vendor passthru implementation

Registered by Rohan

The goal of this blueprint is to implement the Seamicro vendor passthru functionality and validate code by adding unittests, functional tests (tempest) for Ironic. The Seamicro vendor passthru will confirm to the Ironic VendorInterface. The Seamicro vendor passthru functionality will use the python-seamicroclient (library) to talk to the Seamicro chassis REST API.

The Seamicro vendor passthru will be implementing 3 actions initially.
1) Allow to set a vlan id for the specified NIC of a server (node) in the Seamicro chassis.

set_node_vlan_id(node, vlan_id):
     seamicroclient.set_vlan_id(node, vlan_id)
     node['properties'].update({'vlan_id': vlan_id})
     db_api.update(node)

2) Allow to create volumes from the specified Seamicro chassis storage pool and attach those volumes to any of the server (node) within that Seamicro chassis

attach_volume(node, volume_id):
     seamicroclient.attach_volume(node, volume_id)
     node['properties'].update({'volume_id': volume_id})
     db_api.update(node)

3) Allow to set boot device for the node, One of [pxe, disk].

set_boot_device(node, boot_device):
    seamicroclient.set_boot_device(node, boot_device)
    return

In the passthru method "set_node_vlan_id", the node object's "properties" will be updated with the "vlan_id" in the Ironic DB.

In the passthru method "attach_volume", the node object's "properties" will be updated with the "volume_id" in the Ironic DB.

The "vlan_id" and "volume_id" will need to be stored in node properties till the node is present in DB.

Once Ironic and SeaMicro has better cinder/neutron support, these passthru methods will be moved to neutron/cinder.

Blueprint information

Status:
Complete
Approver:
aeva black
Priority:
Low
Drafter:
None
Direction:
Approved
Assignee:
Rohan
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Rohan
Completed by
aeva black

Related branches

Sprints

Whiteboard

Thanks for the clarifications! A little feedback -- please see drivers.modules.ipminative _set_boot_device() for an example of this method. I think you can implement the same interface in your driver.

Also, regarding the attach_volume, this is great. There's similar work being done associated with this BP: https://blueprints.launchpad.net/ironic/+spec/cinder-integration. I believe you're on the right track, and the long-term code path is:
1. user creates cinder volume
2. user requests volume be attached to an instance (or that an instance be started from volume)
3. cinder (or nova) forwards that request to ironic to attach the volume
4. ironic forwards that to the driver

Cheers,
-Devananda

Rohan:
Vendor passthru review : https://review.openstack.org/#/c/70720/

Gerrit topic: https://review.openstack.org/#q,topic:bp/seamicro-vendor-passthru-interface-implementation,n,z

Addressed by: https://review.openstack.org/70719
    Implement the SeaMicro Power driver

Addressed by: https://review.openstack.org/70720
    Implements SeaMicro VendorPassThru functionality

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.