host = Attribute("host", "Name of the physical machine",
flags = Flags.Design)
- #disk_image = Attribute("disk_image", "Specify a specific disk image for a node",
- # flags = Flags.Design)
+ disk_image = Attribute("disk_image", "Specify a specific disk image for a node",
+ flags = Flags.Design)
cls._register_attribute(username)
cls._register_attribute(identity)
cls._register_attribute(gateway_user)
cls._register_attribute(gateway)
cls._register_attribute(host)
- #cls._register_attribute(disk_image)
+ cls._register_attribute(disk_image)
def __init__(self, ec, guid):
super(WilabtSfaNode, self).__init__(ec, guid)
Based on the attributes defined by the user, discover the suitable
node for provision.
"""
- if self._skip_provision():
- super(WilabtSfaNode, self).do_discover()
- return
-
nodes = self.sfaapi.get_resources_hrn()
host = self._get_host()
Add node to user's slice and verifing that the node is functioning
correctly. Check ssh, omf rc running, hostname, file system.
"""
- if self._skip_provision():
- super(WilabtSfaNode, self).do_provision()
- return
-
provision_ok = False
ssh_ok = False
proc_ok = False
while not provision_ok:
node = self._node_to_provision
- if self._slicenode:
- self._delete_from_slice()
- self.debug("Waiting 300 sec for re-adding to slice")
- time.sleep(300) # Timout for the testbed to allow a new reservation
+ #if self._slicenode:
+ # self._delete_from_slice()
+ # self.debug("Waiting 480 sec for re-adding to slice")
+ # time.sleep(480) # Timout for the testbed to allow a new reservation
self._add_node_to_slice(node)
t = 0
while not self._check_if_in_slice([node]) and t < timeout \
"""
self.info(" Adding node to slice ")
slicename = self.get("slicename")
- #disk_image = self.get("disk_image")
- #if disk_image is not None:
- # properties = {'disk_image': disk_image}
- #else: properties = None
- properties = None
+ disk_image = self.get("disk_image")
+ if disk_image is not None:
+ properties = {'disk_image': disk_image}
+ else: properties = None
+ #properties = None
self.sfaapi.add_resource_to_slice_batch(slicename, host_hrn, properties=properties)
def _delete_from_slice(self):