Example #1
0
 def __init__(self):
     self.appliance_store = Basic.getApplianceStore()
     self.image_store     = Basic.getImageStore()
     self.manager         = Basic.getGridManager()
     self.registry        = Basic.getPlatformRegistry()
     self.node_service    = NodeService()
     self.storage_manager = Basic.getStorageManager()
Example #2
0
    def loadAll():        
        manager = Basic.getGridManager()
        
        # The data center "root" node                
        dcNode = TreeNode("Data Center", constants.DATA_CENTER, "Data Center", 
                          TreeNode.get_state_pixbuf(constants.DATA_CENTER), "true")
        
        # The list of managed nodes appear 1st
        nodes = manager.getNodeList()
        for node in nodes:
            managed_node = manager.getNode(node)
            TreeNode.load_managed_node(managed_node, dcNode)

        # now the list of server groups
        groups = manager.getGroupList()
        groupNames = manager.getGroupNames()    
        for name in groupNames:
            group = groups[name]
            TreeNode.load_server_group(group, dcNode)

        # the image store
        image_store = Basic.getImageStore()
        isNode = TreeNode("Image Store", constants.IMAGE_STORE, "Image Store", 
                          TreeNode.get_state_pixbuf(constants.IMAGE_STORE), "true")
        image_groups = image_store.get_image_groups()    
               
        # now the list of images
        for group in image_groups.itervalues():
            TreeNode.load_image_group(group, isNode)
                       
        return [dcNode, isNode]
Example #3
0
def zap(msec=10, samplingfreq=44100, amplitude=0.95, shape='sine'):
	"""create a bipolar pulse"""###	
	f = 1000.0 / float(msec)
	if shape in ['sine', 'sin', 'square']:
		carrier = Basic.wavegen(freq_hz=f, samplingfreq_hz=samplingfreq, duration_msec=msec, container=wav(), waveform=numpy.sin)
		stim = Basic.ampmod(carrier, freq_hz=f)
	else:
		raise ValueError, 'unrecognized shape "%s"' % shape
	if shape == 'square':
		y = stim.y
		y[numpy.where(y < 0)] = -1
		y[numpy.where(y > 0)] = +1
	stim.autoscale(amplitude)
	return stim
Example #4
0
File: VMInfo.py Project: smarkm/ovm
    def fromXml(xml):

        vm_info = VMInfo()

        manager      = Basic.getGridManager()
        registry     = Basic.getPlatformRegistry()
        image_store  = Basic.getImageStore()


        node_id     = xml.getAttribute("nodeId")
        dom_id      = xml.getAttribute("domId")
        image_id    = xml.getAttribute("imageId")

        vm_info.node_id = node_id
        vm_info.dom_id  = dom_id
        vm_info.image_id = image_id

        managed_node = manager.getNode(node_id)
        dom          = managed_node.get_dom(dom_id)
        platform     = managed_node.get_platform()

        if dom is None:
            platform_object   = registry.get_platform_object(platform)
            vm_info.vm_config = platform_object.create_vm_config(managed_node)
            vm_info.vm_config.platform   = platform
            vm_info.vm_config.set_managed_node(managed_node)
        else:
            vm_info.vm_config = dom.get_config()
            vm_info.vm_config.platform   = platform
            vm_info.vm_config.set_managed_node(managed_node)
        
                
        
        vm_info.vm_config.image_id = image_id
        vm_info.parseVMInfo(xml)
        
        image = image_store.get_image(image_id)
        if image is not None:
            image_vm_config, image_config = image.get_configs()
            vm_info.image_config = image_config

#        vm_info.instantiate_configs(managed_node,
#                                    image_store,
#                                    vm_info.vm_config.image_name,
#                                    vm_info.vm_config.image_location,
#                                    vm_info.vm_config,
#                                    vm_info.image_config)
        
        cherrypy.log(vm_info.vm_config.filename)
        return vm_info
Example #5
0
 def get_appliance_info(self, auth, domId, nodeId, action):
     provider_id = None
     manager = Basic.getGridManager()
     node = manager.getNode(auth, nodeId)
     vm = node.get_dom(domId)
     if vm and vm.is_resident() and vm.get_config():
         config = vm.get_config()
         provider_id = config['provider_id']
     result = {}
     if provider_id:
         proxy = self.get_appliance_ops(provider_id)
         app_url, mgmt_url, creds = proxy.get_info(vm)
         app_protocol, host, app_port, app_path = app_url
         app_mgmt_protocol, host, app_mgmt_port = mgmt_url
         username, password = creds
         result = dict(app_protocol=app_protocol, host=host, app_port=app_port, app_path=app_path, app_mgmt_protocol=app_mgmt_protocol, app_mgmt_port=app_mgmt_port, username=username, password=password)
         result['is_valid'] = proxy.is_valid_info(vm)
         web_url = ''
         try:
             web_url = proxy.get_web_url(vm)
         except Exception as e:
             print e
         result['web_url'] = web_url
         if action:
             mgmt_web_url = ''
             try:
                 mgmt_web_url = proxy.get_mgmt_web_url(vm, proxy.get_path(action))
             except Exception as e:
                 result['mgmt_web_url'] = mgmt_web_url
     return result
Example #6
0
    def get_target_image_groups(self, auth, nodeId):
        try:
            manager = Basic.getGridManager()
            managed_node = manager.getNode(auth, nodeId)
            result = []
            if managed_node is None:
                raise Exception('Cannot find the Managed Node.')

            result = []
            mnode_ent = auth.get_entity(managed_node.id)
            dc_ent = mnode_ent.parents[0].parents[0]
            
            image_groups = self.image_store.get_image_groups(auth,dc_ent.entity_id)

            for image_group in image_groups.itervalues():
                count = 0
                images = self.get_group_images(auth, image_group.id)

                for image in images.itervalues():
                    if managed_node.is_image_compatible(image):
                        count = count + 1
                        break
                if count > 0:
                    result.append(dict(name=image_group.get_name(), id=image_group.get_id()))

        except Exception as ex:
            print_traceback()
            LOGGER.error(to_str(ex).replace("'", ''))
            return ("{success: false,msg: '", to_str(ex).replace("'", ''), "'}")

        return dict(success='true', image_groups=result)
Example #7
0
    def get_target_images(self, auth, nodeId, imageGroupId):
        try:
            manager = Basic.getGridManager()
            managed_node = manager.getNode(auth, nodeId)
            if managed_node is None:
                raise Exception('Cannot find the Managed Node.')
            result = []
            image_groups = {}
            if imageGroupId is not None:
                image_group = self.image_store.get_image_group(auth, imageGroupId)
                image_groups = {image_group.get_id():image_group}
            else:
                image_groups = self.image_store.get_image_groups(auth)
            
            for image_group in image_groups.itervalues():
                images = self.image_store.get_group_images(auth, image_group.id)
                for image in images.itervalues():
                    if managed_node.is_image_compatible(image) and not image.is_template:
                        result.append(dict(name=image.get_name(), id=image.get_id(), group_id=image_group.get_id()))
        except Exception as ex:
            print_traceback()
            LOGGER.error(to_str(ex).replace("'", ''))
            return ("{success: false,msg: '", to_str(ex).replace("'", ''), "'}")

        return dict(success='true', images=result)
Example #8
0
    def toXml(self, xml):
        data_center_xml = xml.createElement('DataCenter')
        servers_xml = xml.createElement('Servers')
        manager = Basic.getGridManager()
        nodes = manager.getNodeList()

        for node in nodes:
            managed_node = manager.getNode(node)
            self.load_managed_node(managed_node, servers_xml, xml)

        if servers_xml.hasChildNodes():
            data_center_xml.appendChild(servers_xml)

        groups_xml = xml.createElement('ServerGroups')
        groups = manager.getGroupList()
        group_names = manager.getGroupNames()

        for name in group_names:
            group = groups[name]
            self.load_group(group, groups_xml, xml)

        if groups_xml.hasChildNodes():
            data_center_xml.appendChild(groups_xml)

        return data_center_xml
Example #9
0
 def import_appliance(self, auth, href, type, arch, pae, hvm, size, provider_id, platform, description, link, image_name, group_id, is_manual, date, time):
     try:
         is_hvm = 'False'
         if hvm == 'true':
             is_hvm = 'True'
         is_pae = 'False'
         if pae == 'true':
             is_pae = 'True'
         image_name = re.sub(ImageStore.INVALID_CHARS_EXP, '_', image_name)
         appliance_entry = {}
         appliance_entry['href'] = href
         appliance_entry['type'] = type
         appliance_entry['arch'] = arch
         appliance_entry['PAE'] = is_pae
         appliance_entry['is_hvm'] = is_hvm
         appliance_entry['size'] = size
         appliance_entry['provider_id'] = provider_id
         appliance_entry['platform'] = platform
         appliance_entry['title'] = image_name
         if appliance_entry['provider_id'].lower() == 'jumpbox':
             appliance_entry['is_hvm'] = 'True'
         p_url = self.appliance_store.get_provider_url(provider_id)
         appliance_entry['provider_url'] = p_url
         p_logo_url = self.appliance_store.get_logo_url(provider_id)
         appliance_entry['provider_logo_url'] = p_logo_url
         if is_manual == 'true':
             description = "Manually imported appliance. Plese use 'Edit Description' menu to put appropriate description here."
             link = ''
         appliance_entry['description'] = description
         appliance_entry['link'] = link
         if self.appliance_store.get_provider(provider_id):
             self.appliance_store.get_provider(provider_id)
             appliance_entry['provider'] = self.appliance_store.get_provider(provider_id)
         else:
             self.appliance_store.get_provider(provider_id)
             appliance_entry['provider'] = provider_id
         if image_name:
             image_name = image_name.strip()
         platform = appliance_entry['platform']
         type = appliance_entry['type']
         if type.lower() not in ('xva', 'file_system', 'jb_archive'):
             raise Exception('Invalid Package type %s: supported package types are XVA, FILE_SYSTEM. JB_ARCHIVE' % type)
         image_store = Basic.getImageStore()
         if image_store.image_exists_by_name(image_name):
             image_store.image_exists_by_name(image_name)
             img = image_store.get_image_by_name(image_name)
             image_store.delete_image(auth, group_id, img.get_id())
         title = appliance_entry.get('title')
         if not title:
             title = ''
         tc = TaskCreator()
         result = tc.import_appliance(auth, appliance_entry, image_store, group_id, image_name, platform.lower(), True, date, time)
         return result
     except Exception as e:
         print_traceback()
         LOGGER.error(to_str(e).replace("'", ''))
         raise e
Example #10
0
    def get_state_pixbuf(node_type = None, node = None):   
        appliance_store = Basic.getApplianceStore()
        
        if node_type is None :
            return
        
        # need to fix these...
        managed_node = None
        provider_id = None
        g_name = None
        dom_name = None
        
        pb = unknown_pb
    
        if node_type == constants.MANAGED_NODE:
            pb = node_pb
        elif node_type == constants.IMAGE_STORE:
            pb = dc_pb
        elif node_type == constants.IMAGE_GROUP:
            pb = image_store_pb
        elif node_type == constants.IMAGE:
            pb = image_pb
            if g_name:
                #provider_id = g_name
                ppb = None
                if provider_id:
                    ppb = ApplianceLogos.get_provider_logo(appliance_store,
                                                           provider_id)
                if ppb:
                    pb = ppb
    
#        elif managed_node is not None and node_type == constants.DOMAIN: # dom
#            dom = managed_node.get_dom(dom_name)
        elif node_type == constants.DOMAIN: # dom
            dom = node
    
            if dom and dom.is_resident():
                try:
                    state = dom.get_state()
                except xmlrpclib.Fault :
                    state = None
    
                if state is not None and state == VM.PAUSED:
                    pb = paused_pb
                else:                                
                    pb = resident_pb
            else:
                #print "constants.get_state_pixbuf not_resident_pb DOMAIN"
                pb = not_resident_pb
                
        elif node_type == constants.SERVER_POOL:
            pb = pool_pb
        elif node_type == constants.DATA_CENTER:
            pb = dc_pb
        
        return pb
Example #11
0
    def get_appliance_menu_items(self,auth,domId,nodeId):

        provider_id=None
        manager = Basic.getGridManager()
        node=manager.getNode(auth,nodeId)
        vm = None
        try:
            vm = node.get_dom(domId)
        except Exception, e:
            LOGGER.error(to_str(e))
Example #12
0
File: VMInfo.py Project: smarkm/ovm
    def fromStore(node_id, dom_id):
        vm_info = VMInfo()

        manager = Basic.getGridManager()

        managed_node = manager.getNode(node_id)
        dom          = managed_node.get_dom(dom_id)
        vm_info.vm_config = dom.get_config()
        vm_info.node_id = node_id
        vm_info.dom_id  = dom_id
        return vm_info
Example #13
0
 def save_appliance_info(self, auth, domId, nodeId, action, props):
     manager = Basic.getGridManager()
     node = manager.getNode(auth, nodeId)
     vm = node.get_dom(domId)
     if vm and vm.get_config():
         config = vm.get_config()
         provider_id = config['provider_id']
         proxy = self.get_appliance_ops(provider_id)
         for key in proxy.get_keys():
             config[key] = props[key]
     manager.save_appliance_info(auth, vm, config)
     return self.get_appliance_info(auth, domId, nodeId, action)
Example #14
0
def createNewBasic(self, wherex, wherey, screenCoordinates = 1):
   self.fromClass = None
   self.toClass = None
   # try the global constraints...
   res = self.ASGroot.preCondition(ASG.CREATE)
   if res:
      self.constraintViolation(res)
      self.mode=self.IDLEMODE
      return

   new_semantic_obj = Basic(self)
   ne = len(self.ASGroot.listNodes["Basic"])
   if new_semantic_obj.keyword_:
      new_semantic_obj.keyword_.setValue(new_semantic_obj.keyword_.toString()+str(ne))
   if screenCoordinates:
      new_obj = graph_Basic(self.UMLmodel.canvasx(wherex), self.UMLmodel.canvasy(wherey), new_semantic_obj)
   else: # already in canvas coordinates
      new_obj = graph_Basic(wherex, wherey, new_semantic_obj)
   new_obj.DrawObject(self.UMLmodel, self.editGGLabel)
   self.UMLmodel.addtag_withtag("Basic", new_obj.tag)
   new_semantic_obj.graphObject_ = new_obj
   self.ASGroot.addNode(new_semantic_obj)
   res = self.ASGroot.postCondition(ASG.CREATE)
   if res:
      self.constraintViolation(res)
      self.mode=self.IDLEMODE
      return

   res = new_semantic_obj.postCondition(ASGNode.CREATE)
   if res:
      self.constraintViolation(res)
      self.mode=self.IDLEMODE
      return

   self.mode=self.IDLEMODE
   if self.editGGLabel :
      self.statusbar.event(StatusBar.TRANSFORMATION, StatusBar.CREATE)
   else:
      self.statusbar.event(StatusBar.MODEL, StatusBar.CREATE)
   return new_semantic_obj
Example #15
0
 def get_appliance_menu_items(self, auth, domId, nodeId=None):
     provider_id = None
     manager = Basic.getGridManager()
     vm = manager.get_dom(auth, domId)
     if vm and vm.is_running() and vm.get_config():
         config = vm.get_config()
         provider_id = config['provider_id']
     result = []
     if provider_id:
         proxy,ops = self.get_appliance_ops(provider_id)
         for key,desc in ops:
             result.append(dict(name=desc, value=key))
     return result
def doCheck(wxParent, descriptorList):
	win = CheckFrame(wxParent, -1, "Descriptor check results", size=(350, 200),
		style = wx.DEFAULT_FRAME_STYLE)
	win.Show(True)
	issues = 0

	issues += Basic.doCheck(descriptorList, win.text)


	win.text.AppendText("------------------\n")
	
	s = ""
	if issues != 1:
		s = "s"

	win.text.AppendText("Check finished, %d issue%s\n" % (issues, s))
Example #17
0
 def config_settings(self, auth, image_id, config, mode,\
                     node_id, group_id, dom_id, vm_name,dateval=None,timeval=None):
     task_service = self.svc_central.get_service(self.task_service_id)
     user_name = self._get_username(auth)
     t= VMConfigSettingsTask(u'Provision VM', {}, [],\
                  dict(image_id=image_id, config=config, mode=mode,\
                       node_id=node_id, group_id=group_id, dom_id=dom_id,\
                       vm_name=vm_name), None, user_name)
     if mode == 'PROVISION_VM':
         t.set_entity_details(node_id)
     elif mode == 'EDIT_VM_INFO':
          manager=Basic.getGridManager()
          managed_node =manager.getNode(auth,node_id)
          if managed_node is not None:
              dom=managed_node.get_dom(dom_id)
              t.set_entity_details(dom.id)
         
     execution_time=getDateTime(dateval,timeval)
     if execution_time is None:
         task_service.submit_sync(t)
     else:
         task_service.submit_schedule(t, execution_time)
     logger.debug("Configuration Task Submitted")
Example #18
0
 def __init__(self):
     self.image_store = Basic.getImageStore()
     self.appliance_store = Basic.getApplianceStore()
Example #19
0
 def __init__(self):
     self.storage_manager = Basic.getStorageManager()
     self.manager = Basic.getGridManager()
     self.sync_manager = SyncDef()
Example #20
0
def amstim(msec=1000, modfreq=20, carrierfreq=200, samplingfreq=1000, amplitude=1.0, carriershape=numpy.sin, modshape=numpy.sin):
	"""create an amplitude-modulated periodic wave"""###
	carrier = Basic.wavegen(freq_hz=carrierfreq, samplingfreq_hz=samplingfreq, duration_msec=msec, container=wav(), waveform=carriershape)
	stim = Basic.ampmod(carrier, freq_hz=modfreq, waveform=modshape)
	stim.autoscale(amplitude)
	return stim
Example #21
0
    def __init__(self, xml_string):
        self.image_store = Basic.getImageStore()
        self.xml_string = xml_string
#        import pprint; print "xml_string:",;pprint.pprint(str(xml_string))
#        print "xml_string is ", type(xml_string), str(xml_string).upper()
        self.xml_dom = minidom.parseString(self.xml_string)
Example #22
0
 def __init__(self):
     self.manager = Basic.getGridManager()
Example #23
0
	def __init__(self, xml_string):
		self.image_store = Basic.getImageStore()
		self.xml_string = xml_string
		self.xml_dom = minidom.parseString(self.xml_string)
Example #24
0
 def __init__(self):
     self.service = MetricsService()
     self.manager = Basic.getGridManager()
     self.utcoffset = None
class TestBasic(unittest.TestCase):
    def __init__(self, *args, **kwargs):
        super(TestBasic, self).__init__(*args, **kwargs)
        self.o = Basic()






    def testFact(self):
        ''' A basic unit test '''
        self.assertEqual(self.o.fact(1), 1)
        self.assertEqual(self.o.fact(4), 24)
        self.assertEqual(self.o.fact(1), 1)






    def testGenFact(self):
        ''' Basic unit test using the generation class '''
        gen = Gen()
        self.assertEqual(self.o.genfact(gen), 1)
        self.assertEqual(self.o.genfact(gen), 2)
        self.assertEqual(self.o.genfact(gen), 6)
        self.assertEqual(self.o.genfact(gen), 24)







    def testGenFact2(self):
        ''' Now let's patch the generation class to return a constant value '''
        with patch.object(Gen, 'get', return_value=3) as mocked:
            gen = Gen()
            self.assertEqual(self.o.genfact(gen), 6)
            self.assertEqual(self.o.genfact(gen), 6)
            self.assertEqual(self.o.genfact(gen), 6)

        self.assertEqual(mocked.call_count, 3)






    @patch.object(Gen, 'get', return_value=3)
    def testGenFact3(self, mocked):
        ''' Patching the class, take 2:  Do it with a decorator'''
        gen = Gen()
        self.assertEqual(self.o.genfact(gen), 6)
        self.assertEqual(self.o.genfact(gen), 6)
        self.assertEqual(self.o.genfact(gen), 6)

        self.assertEqual(mocked.call_count, 3)






    def testGenFact4(self):
        '''Demonstrate why we might use a 'with' statement -- different mocks'''
        with patch.object(Gen, 'get', return_value=3) as mocked:
            gen = Gen()
            self.assertEqual(self.o.genfact(gen), 6)
            self.assertEqual(self.o.genfact(gen), 6)
            self.assertEqual(mocked.call_count, 2)

        with patch.object(Gen, 'get', return_value=4) as mocked:
            gen = Gen()
            self.assertEqual(self.o.genfact(gen), 24)






    def testFact2(self):
        '''Now an interesting case -- we're going to use mock to count how many times and how fact is called'''
        with patch.object(self.o, 'fact', wraps=self.o.fact) as mocked:
            with patch.object(self.o, 'genfact', wraps=self.o.genfact) as mgen:
                self.assertEqual(self.o.fact(4), 24)
                self.assertEqual(mocked.call_count, 4)

                mocked.assert_any_call(4)
                mgen.assert_not_called()
 def __init__(self, *args, **kwargs):
     super(TestBasic, self).__init__(*args, **kwargs)
     self.o = Basic()
Example #27
0
    def import_appliance(self,auth,href,type,arch,pae,hvm,size,provider_id,platform,description,link,image_name,group_id,is_manual,date,time):
        try:           
            is_hvm='False'
            if hvm == 'true':
                is_hvm='True'
            is_pae='False'
            if pae == 'true':
                is_pae='True'

            image_name = re.sub(ImageStore.INVALID_CHARS_EXP,'_', image_name)
                        
            appliance_entry = {}
            appliance_entry["href"] = href
            appliance_entry["type"] = type
            appliance_entry["arch"] = arch
            appliance_entry["PAE"] = is_pae
            appliance_entry["is_hvm"] = is_hvm
            appliance_entry["size"] = size
            appliance_entry["provider_id"] = provider_id
            appliance_entry["platform"] = platform
            appliance_entry["title"] = image_name

            if appliance_entry["provider_id"].lower() == "jumpbox":
                appliance_entry["is_hvm"] = "True"

            
            p_url = self.appliance_store.get_provider_url(provider_id)
            appliance_entry["provider_url"] = p_url
            p_logo_url = self.appliance_store.get_logo_url(provider_id)
            appliance_entry["provider_logo_url"] = p_logo_url

            if is_manual=='true':
                description="Manually imported appliance. Plese use 'Edit Description' menu to put appropriate description here."
                link=""

            appliance_entry["description"] = description
            appliance_entry["link"] = link

            if self.appliance_store.get_provider(provider_id):
                appliance_entry["provider"] = self.appliance_store.get_provider(provider_id)
            else:
                appliance_entry["provider"] = provider_id

            if image_name:
                image_name = image_name.strip()

            platform = appliance_entry["platform"]
            type = appliance_entry["type"]
            if type.lower() not in ("xva", "file_system", "jb_archive"):
                raise Exception("Invalid Package type %s: supported package types are XVA, FILE_SYSTEM. JB_ARCHIVE" % type)

            image_store=Basic.getImageStore()
            
            #force = False

            #for image_group in image_store.get_image_groups(auth).values():
            if image_store.image_exists_by_name(image_name):                
                img = image_store.get_image_by_name(image_name)
                image_store.delete_image(auth,group_id, img.get_id())
                    
            #image_group = image_store.get_image_groups(auth)[group_id]
            
            # Create a new image and add it to the group.
            #img = image_store.create_image(auth,group_id, image_name, platform.lower())

            title = appliance_entry.get("title")
            if not title:
                title = ""

            tc = TaskCreator()
            tc.import_appliance(auth, appliance_entry, image_store, \
                                group_id, image_name, platform.lower(),True,date,time)
        except Exception, e:
            print_traceback()
            LOGGER.error(to_str(e).replace("'",""))
            raise e
Example #28
0
            objDic_new[key] = objDic[key]

        if objDic_new:
            returnVal = objDic_new
        else:
            returnVal = None
        return returnVal

    def get_network_models(self):

        infolist=[]
        infolist.append(dict(name="i82551",value="i82551"))
        infolist.append(dict(name="i8255715",value="i8255715"))
        infolist.append(dict(name="i82559er",value="i82559er"))
        infolist.append(dict(name="ne2k-pci",value="ne2k-pci"))
        infolist.append(dict(name="ne2k-isa",value="ne2k-isa"))
        infolist.append(dict(name="pcnet",value="pcnet"))
        infolist.append(dict(name="rtl8139",value="rtl8139"))
        infolist.append(dict(name="rmc91c111",value="rmc91c111"))
        infolist.append(dict(name="lance",value="lance"))
        infolist.append(dict(name="mef-fec",value="mef-fec"))
        infolist.append(dict(name="virtio",value="virtio"))
        return infolist

if __name__ == "__main__":

    manager = Basic.getGridManager()
    managed_node = manager.getNode("Servers", "localhost")
    nw=NetworkService()
    nw.get_available_nws(managed_node, "PROVISION_VM")
Example #29
0
 def __init__(self):
     self.nw_manager = Basic.getNetworkManager()
     self.managed_node = Basic.getManagedNode()
     self.sync_manager = SyncDef()
     self.manager=Basic.getGridManager()