示例#1
0
文件: host.py 项目: KrisSaxton/spoke
def uuid_search(get_mac=False):
    try:
        conf = _spoke_config(_salt_config('config'))
        uuid = SpokeHostUUID()
        print 'My Get_mac is {0}'.format(get_mac)
        result = uuid.get(get_mac=get_mac)
    except error.SpokeError as e:
        result = common.handle_error(e)
    return result
示例#2
0
文件: host.py 项目: KrisSaxton/spoke
def uuid_search(get_mac=False):
    try:
        conf = _spoke_config(_salt_config('config'))
        uuid = SpokeHostUUID()
        print 'My Get_mac is {0}'.format(get_mac)
        result = uuid.get(get_mac=get_mac)
    except error.SpokeError as e:
        result = common.handle_error(e)
    return result
示例#3
0
文件: host.py 项目: mattmb/spoke
def uuid_search(get_mac=False):

    print get_mac
    print type(get_mac)
    try:
        from spoke.lib.host import SpokeHostUUID
        uuid = SpokeHostUUID()
        result = uuid.get(get_mac)
    except error.SpokeError as e:
        result = common.handle_error(e)
    return result  
示例#4
0
文件: host.py 项目: mattmb/spoke
def uuid_search(get_mac=False):

    print get_mac
    print type(get_mac)
    try:
        from spoke.lib.host import SpokeHostUUID

        uuid = SpokeHostUUID()
        result = uuid.get(get_mac)
    except error.SpokeError as e:
        result = common.handle_error(e)
    return result
示例#5
0
文件: test_host.py 项目: mattmb/spoke
 def test_get_next_free_uuid(self):
     """Retrieve next free uuid; return uuid as list."""
     next_uuid = SpokeHostUUID()
     result = next_uuid.get()
     expected_data = [1]
     self.assertEquals(result['data'], expected_data)