Commit 95905957 by sanshi

资产

parent 1b955864
...@@ -46,8 +46,8 @@ class TestDeviceAssetGetFactoryList(object): ...@@ -46,8 +46,8 @@ class TestDeviceAssetGetFactoryList(object):
base_port = 161 base_port = 161
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
...@@ -126,7 +126,7 @@ class TestDeviceAssetGetFactoryList(object): ...@@ -126,7 +126,7 @@ class TestDeviceAssetGetFactoryList(object):
name = self.base_name + "05" name = self.base_name + "05"
self.app.case_create_host(name=name, host_type=self.base_type_agent, self.app.case_create_host(name=name, host_type=self.base_type_agent,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_asset_getFactoryList(token=self.token, hostType=self.base_type_agent) response = self.app.device_asset_getFactoryList(token=self.token, hostType=self.base_type_agent)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
...@@ -139,7 +139,7 @@ class TestDeviceAssetGetFactoryList(object): ...@@ -139,7 +139,7 @@ class TestDeviceAssetGetFactoryList(object):
name = self.base_name + "06" name = self.base_name + "06"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_asset_getFactoryList(token=self.token, hostType=self.base_type_snmp) response = self.app.device_asset_getFactoryList(token=self.token, hostType=self.base_type_snmp)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
......
...@@ -46,8 +46,8 @@ class TestDeviceAssetIps(object): ...@@ -46,8 +46,8 @@ class TestDeviceAssetIps(object):
base_port = 161 base_port = 161
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
...@@ -137,7 +137,7 @@ class TestDeviceAssetIps(object): ...@@ -137,7 +137,7 @@ class TestDeviceAssetIps(object):
name = self.base_name + "05" name = self.base_name + "05"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_asset_ips(token=self.token, ipName=self.base_ip) response = self.app.device_asset_ips(token=self.token, ipName=self.base_ip)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
......
...@@ -47,8 +47,8 @@ class TestDeviceDelete(object): ...@@ -47,8 +47,8 @@ class TestDeviceDelete(object):
base_port = 161 base_port = 161
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
...@@ -139,7 +139,7 @@ class TestDeviceDelete(object): ...@@ -139,7 +139,7 @@ class TestDeviceDelete(object):
name = self.base_name + "04" name = self.base_name + "04"
host_id_1 = self.app.case_create_host(name=name, host_type=self.base_type_snmp, host_id_1 = self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_delete(token=self.token, hostids=[host_id_1]) response = self.app.device_delete(token=self.token, hostids=[host_id_1])
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.check_select(device_id=host_id_1) self.check_select(device_id=host_id_1)
...@@ -153,13 +153,13 @@ class TestDeviceDelete(object): ...@@ -153,13 +153,13 @@ class TestDeviceDelete(object):
name_3 = self.base_name + "053" name_3 = self.base_name + "053"
host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp, host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp, host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp, host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_delete(token=self.token, hostids=[host_id_1, host_id_2, host_id_3]) response = self.app.device_delete(token=self.token, hostids=[host_id_1, host_id_2, host_id_3])
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.check_select(device_id=host_id_1) self.check_select(device_id=host_id_1)
......
...@@ -45,8 +45,8 @@ class TestDeviceGet(object): ...@@ -45,8 +45,8 @@ class TestDeviceGet(object):
base_port = 161 base_port = 161
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
base_business_name_1 = "SS 自动化专用业务1" base_business_name_1 = "SS 自动化专用业务1"
base_business_name_2 = "SS 自动化专用业务2" base_business_name_2 = "SS 自动化专用业务2"
...@@ -123,7 +123,7 @@ class TestDeviceGet(object): ...@@ -123,7 +123,7 @@ class TestDeviceGet(object):
name = self.base_name + "05" name = self.base_name + "05"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, name=self.base_name + "05") response = self.app.device_get(token=self.token, name=self.base_name + "05")
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="name", _value=self.base_name + "05") self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="name", _value=self.base_name + "05")
...@@ -134,7 +134,7 @@ class TestDeviceGet(object): ...@@ -134,7 +134,7 @@ class TestDeviceGet(object):
name = self.base_name + "06" name = self.base_name + "06"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, _type=self.base_type_snmp) response = self.app.device_get(token=self.token, _type=self.base_type_snmp)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="hostType", _value=self.base_type_snmp) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="hostType", _value=self.base_type_snmp)
...@@ -145,7 +145,7 @@ class TestDeviceGet(object): ...@@ -145,7 +145,7 @@ class TestDeviceGet(object):
name = self.base_name + "07" name = self.base_name + "07"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, manageLevel=1) response = self.app.device_get(token=self.token, manageLevel=1)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="manageLevel", _value=1) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="manageLevel", _value=1)
...@@ -156,7 +156,7 @@ class TestDeviceGet(object): ...@@ -156,7 +156,7 @@ class TestDeviceGet(object):
name = self.base_name + "08" name = self.base_name + "08"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, monitorStatus=1) response = self.app.device_get(token=self.token, monitorStatus=1)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="monitorStatus", _value=1) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="monitorStatus", _value=1)
...@@ -167,7 +167,7 @@ class TestDeviceGet(object): ...@@ -167,7 +167,7 @@ class TestDeviceGet(object):
name = self.base_name + "09" name = self.base_name + "09"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, available=1) response = self.app.device_get(token=self.token, available=1)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="available", _value=1) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="available", _value=1)
...@@ -178,8 +178,8 @@ class TestDeviceGet(object): ...@@ -178,8 +178,8 @@ class TestDeviceGet(object):
name = self.base_name + "10" name = self.base_name + "10"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, businessIds=self.base_business_id_1 + "," + self.base_business_id_2) response = self.app.device_get(token=self.token, businessIds=[self.base_business_id_1, self.base_business_id_2])
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="businessesNames", _value=self.base_business_name_1 + "," + self.base_business_name_2) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="businessesNames", _value=self.base_business_name_1 + "," + self.base_business_name_2)
...@@ -189,7 +189,7 @@ class TestDeviceGet(object): ...@@ -189,7 +189,7 @@ class TestDeviceGet(object):
name = self.base_name + "11" name = self.base_name + "11"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, memberId=11) response = self.app.device_get(token=self.token, memberId=11)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="memberName", _value="sanshi") self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="memberName", _value="sanshi")
...@@ -200,7 +200,7 @@ class TestDeviceGet(object): ...@@ -200,7 +200,7 @@ class TestDeviceGet(object):
name = self.base_name + "12" name = self.base_name + "12"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, factoryId=1) response = self.app.device_get(token=self.token, factoryId=1)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="factoryId", _value=1) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="factoryId", _value=1)
...@@ -211,7 +211,7 @@ class TestDeviceGet(object): ...@@ -211,7 +211,7 @@ class TestDeviceGet(object):
name = self.base_name + "13" name = self.base_name + "13"
self.app.case_create_host(name=name, host_type=self.base_type_snmp, self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_get(token=self.token, manageIp=self.base_ip) response = self.app.device_get(token=self.token, manageIp=self.base_ip)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="manageIp", _value=self.base_ip) self.app.check_keyValue(response=UtilsResponse().get_data(response=response), _key="manageIp", _value=self.base_ip)
......
...@@ -47,8 +47,8 @@ class TestDeviceStatus(object): ...@@ -47,8 +47,8 @@ class TestDeviceStatus(object):
base_port = 161 base_port = 161
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
...@@ -137,7 +137,7 @@ class TestDeviceStatus(object): ...@@ -137,7 +137,7 @@ class TestDeviceStatus(object):
name = self.base_name + "04" name = self.base_name + "04"
host_id = self.app.case_create_host(name=name, host_type=self.base_type_snmp, host_id = self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=0) monitorStatus=0)
response = self.app.device_status(token=self.token, hostids=[host_id], monitorStatus=0) response = self.app.device_status(token=self.token, hostids=[host_id], monitorStatus=0)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
...@@ -150,7 +150,7 @@ class TestDeviceStatus(object): ...@@ -150,7 +150,7 @@ class TestDeviceStatus(object):
name = self.base_name + "05" name = self.base_name + "05"
host_id = self.app.case_create_host(name=name, host_type=self.base_type_snmp, host_id = self.app.case_create_host(name=name, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
response = self.app.device_status(token=self.token, hostids=[host_id], monitorStatus=0) response = self.app.device_status(token=self.token, hostids=[host_id], monitorStatus=0)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
...@@ -170,15 +170,15 @@ class TestDeviceStatus(object): ...@@ -170,15 +170,15 @@ class TestDeviceStatus(object):
host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp, host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp, host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp, host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
response = self.app.device_status(token=self.token, hostids=[host_id_1, host_id_2, host_id_3], monitorStatus=0) response = self.app.device_status(token=self.token, hostids=[host_id_1, host_id_2, host_id_3], monitorStatus=0)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
...@@ -196,15 +196,15 @@ class TestDeviceStatus(object): ...@@ -196,15 +196,15 @@ class TestDeviceStatus(object):
host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp, host_id_1 = self.app.case_create_host(name=name_1, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp, host_id_2 = self.app.case_create_host(name=name_2, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp, host_id_3 = self.app.case_create_host(name=name_3, host_type=self.base_type_snmp,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
monitorStatus=1) monitorStatus=1)
response = self.app.device_status(token=self.token, hostids=[host_id_1, host_id_2, host_id_3], monitorStatus=0) response = self.app.device_status(token=self.token, hostids=[host_id_1, host_id_2, host_id_3], monitorStatus=0)
self.app.check_code(response=response, code=0) self.app.check_code(response=response, code=0)
......
...@@ -52,8 +52,8 @@ class TestDeviceUpdate(object): ...@@ -52,8 +52,8 @@ class TestDeviceUpdate(object):
base_update_port = 171 base_update_port = 171
base_name = "SS 自动化专用" base_name = "SS 自动化专用"
base_business_id_1 = "12" base_business_id_1 = 12
base_business_id_2 = "13" base_business_id_2 = 13
@classmethod @classmethod
def setup_class(cls): def setup_class(cls):
...@@ -192,11 +192,11 @@ class TestDeviceUpdate(object): ...@@ -192,11 +192,11 @@ class TestDeviceUpdate(object):
name = self.base_name + "04" name = self.base_name + "04"
host_id = self.app.case_create_host(name=name, host_type=self.base_type_agent, host_id = self.app.case_create_host(name=name, host_type=self.base_type_agent,
iplist=self.base_ip, port=self.base_port, iplist=self.base_ip, port=self.base_port,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2) businessIds=[self.base_business_id_1, self.base_business_id_2])
response = self.app.device_update(token=self.token, hostid=host_id, hostName=name + "修改", response = self.app.device_update(token=self.token, hostid=host_id, hostName=name + "修改",
dns=self.base_update_dns, monitorInterface=self.base_update_port, dns=self.base_update_dns, monitorInterface=self.base_update_port,
monitorType=2, manageLevel=1, parentHost=1, monitorType=2, manageLevel=1, parentHost=1,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
hostTypeTree="hostTypeTree", businessTree="businessTree", hostTypeTree="hostTypeTree", businessTree="businessTree",
opsPerson=11, snmpCommunity="snmpCommunity", opsPerson=11, snmpCommunity="snmpCommunity",
ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername", ipmiPassword="ipmiPassword", ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername", ipmiPassword="ipmiPassword",
...@@ -209,13 +209,13 @@ class TestDeviceUpdate(object): ...@@ -209,13 +209,13 @@ class TestDeviceUpdate(object):
ops_person=11, snmp_community="snmpCommunity", ops_person=11, snmp_community="snmpCommunity",
ipmi_authtype=1, ipmi_privilege=1, ipmi_username="ipmiUsername", ipmi_password="ipmiPassword", parent_host=1, ipmi_authtype=1, ipmi_privilege=1, ipmi_username="ipmiUsername", ipmi_password="ipmiPassword", parent_host=1,
factoryId=1, model="model", version="version", serialnumber="serialnumber", description="description", factoryId=1, model="model", version="version", serialnumber="serialnumber", description="description",
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, hostTypeTree="hostTypeTree", businessTree="businessTree") businessIds=[self.base_business_id_1, self.base_business_id_2], hostTypeTree="hostTypeTree", businessTree="businessTree")
self.check_interface(host_id=host_id, _type=1, useip=0, ip="", dns=self.base_update_dns, port=self.base_update_port) self.check_interface(host_id=host_id, _type=1, useip=0, ip="", dns=self.base_update_dns, port=self.base_update_port)
response = self.app.device_update(token=self.token, hostid=host_id, hostName=name + "修改1", response = self.app.device_update(token=self.token, hostid=host_id, hostName=name + "修改1",
iplist=self.base_ip, monitorInterface=self.base_port, iplist=self.base_ip, monitorInterface=self.base_port,
monitorType=1, manageLevel=2, parentHost=1, monitorType=1, manageLevel=2, parentHost=1,
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, hostTypeTree="hostTypeTree1", businessTree="businessTree1", businessIds=[self.base_business_id_1, self.base_business_id_2], hostTypeTree="hostTypeTree1", businessTree="businessTree1",
opsPerson=11, snmpCommunity="snmpCommunity1", opsPerson=11, snmpCommunity="snmpCommunity1",
ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername1", ipmiPassword="ipmiPassword1", ipmiAuthtype=1, ipmiPrivilege=1, ipmiUsername="ipmiUsername1", ipmiPassword="ipmiPassword1",
factoryId=1, model="1model", version="1version", serialnumber="1serialnumber", description="1description", factoryId=1, model="1model", version="1version", serialnumber="1serialnumber", description="1description",
...@@ -228,7 +228,7 @@ class TestDeviceUpdate(object): ...@@ -228,7 +228,7 @@ class TestDeviceUpdate(object):
ops_person=11, snmp_community="snmpCommunity1", ops_person=11, snmp_community="snmpCommunity1",
ipmi_authtype=1, ipmi_privilege=1, ipmi_username="ipmiUsername1", ipmi_password="ipmiPassword1", parent_host=1, ipmi_authtype=1, ipmi_privilege=1, ipmi_username="ipmiUsername1", ipmi_password="ipmiPassword1", parent_host=1,
factoryId=1, model="1model", version="1version", serialnumber="1serialnumber", description="1description", factoryId=1, model="1model", version="1version", serialnumber="1serialnumber", description="1description",
businessIds=self.base_business_id_1 + "," + self.base_business_id_2, businessIds=[self.base_business_id_1, self.base_business_id_2],
hostTypeTree="hostTypeTree1", businessTree="businessTree1", ) hostTypeTree="hostTypeTree1", businessTree="businessTree1", )
self.check_interface(host_id=host_id, _type=1, useip=1, ip=self.base_ip, dns="", port=self.base_port) self.check_interface(host_id=host_id, _type=1, useip=1, ip=self.base_ip, dns="", port=self.base_port)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment