Commit f767b4de by sanshi

整个资产代码重构

parent 2f622274
......@@ -38,6 +38,7 @@ class DeviceUpdate(object):
self.monitorType = None
self.parentHost = None
self.businessIds = None
self.hostTypeTree = None
self.businessTree = None
self.opsPerson = None
self.snmpCommunity = None
......@@ -71,6 +72,7 @@ class DeviceUpdate(object):
base.dict_add_key(_key="monitorType", value=self.monitorType)
base.dict_add_key(_key="parentHost", value=self.parentHost)
base.dict_add_key(_key="businessIds", value=self.businessIds)
base.dict_add_key(_key="hostTypeTree", value=self.hostTypeTree)
base.dict_add_key(_key="businessTree", value=self.businessTree)
base.dict_add_key(_key="opsPerson", value=self.opsPerson)
base.dict_add_key(_key="snmpCommunity", value=self.snmpCommunity)
......
......@@ -30,6 +30,7 @@ from WorkApi.APP.Experience.experience_delete import ExperienceDelete
from WorkApi.APP.Experience.experience_get import ExperienceGet
from WorkApi.APP.Experience.experience_update import ExperienceUpdate
from WorkApi.APP.File.file_upload import FileUpload
from WorkApi.APP.HostMonitor.hostMonitor_get import HostMonitorGet
from WorkApi.APP.HostType.hostType_create import HostTypeCreate
from WorkApi.APP.HostType.hostType_delete import HostTypeDelete
from WorkApi.APP.HostType.hostType_get import HostTypeGet
......@@ -253,7 +254,7 @@ class AppBase(object):
@allure.step("调用接口:device.update")
def device_update(self, token=None, hostid=None, hostName=None, hostType=None, manageLevel=None, iplist=None, dns=None,
monitorInterface=None, monitorType=None, parentHost=None, businessIds=None,
businessTree=None, opsPerson=None, snmpCommunity=None, ipmiAuthtype=None,
hostTypeTree=None, businessTree=None, opsPerson=None, snmpCommunity=None, ipmiAuthtype=None,
ipmiPrivilege=None, ipmiUsername=None, ipmiPassword=None,
factoryId=None, model=None, version=None, serialnumber=None,
description=None, monitorStatus=None):
......@@ -269,6 +270,7 @@ class AppBase(object):
api.monitorType = monitorType
api.parentHost = parentHost
api.businessIds = businessIds
api.hostTypeTree = hostTypeTree
api.businessTree = businessTree
api.opsPerson = opsPerson
api.snmpCommunity = snmpCommunity
......@@ -818,3 +820,15 @@ class AppBase(object):
self.check_code(response=response, code=0)
experienceid = UtilsResponse().get_data(response=response)
return experienceid
@allure.step("调用接口:hostmonitor.get")
def hostmonitor_get(self, hostName=None, assetCode=None, manageIp=None, parentHost=None, available=None, status=None):
api = HostMonitorGet(_host=self.host)
api.hostName = hostName
api.assetCode = assetCode
api.manageIp = manageIp
api.parentHost = parentHost
api.available = available
api.status = status
api.get_response()
return api.response
\ No newline at end of file
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