Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zmops-test
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sanshi
zmops-test
Commits
61f691c6
Commit
61f691c6
authored
Dec 16, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整个资产代码重构
parent
ba9dc48c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
1 deletion
+41
-1
device_create.py
WorkApi/APP/Device/device_create.py
+2
-0
__init__.py
WorkCase/APP/__init__.py
+38
-1
hosts.py
WorkData/Argus/hosts.py
+1
-0
No files found.
WorkApi/APP/Device/device_create.py
View file @
61f691c6
...
@@ -37,6 +37,7 @@ class DeviceCreate(object):
...
@@ -37,6 +37,7 @@ class DeviceCreate(object):
self
.
monitorType
=
None
self
.
monitorType
=
None
self
.
parentHost
=
None
self
.
parentHost
=
None
self
.
businessIds
=
None
self
.
businessIds
=
None
self
.
hostTypeTree
=
None
self
.
businessTree
=
None
self
.
businessTree
=
None
self
.
opsPerson
=
None
self
.
opsPerson
=
None
self
.
snmpCommunity
=
None
self
.
snmpCommunity
=
None
...
@@ -69,6 +70,7 @@ class DeviceCreate(object):
...
@@ -69,6 +70,7 @@ class DeviceCreate(object):
base
.
dict_add_key
(
_key
=
"monitorType"
,
value
=
self
.
monitorType
)
base
.
dict_add_key
(
_key
=
"monitorType"
,
value
=
self
.
monitorType
)
base
.
dict_add_key
(
_key
=
"parentHost"
,
value
=
self
.
parentHost
)
base
.
dict_add_key
(
_key
=
"parentHost"
,
value
=
self
.
parentHost
)
base
.
dict_add_key
(
_key
=
"businessIds"
,
value
=
self
.
businessIds
)
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
=
"businessTree"
,
value
=
self
.
businessTree
)
base
.
dict_add_key
(
_key
=
"opsPerson"
,
value
=
self
.
opsPerson
)
base
.
dict_add_key
(
_key
=
"opsPerson"
,
value
=
self
.
opsPerson
)
base
.
dict_add_key
(
_key
=
"snmpCommunity"
,
value
=
self
.
snmpCommunity
)
base
.
dict_add_key
(
_key
=
"snmpCommunity"
,
value
=
self
.
snmpCommunity
)
...
...
WorkCase/APP/__init__.py
View file @
61f691c6
...
@@ -22,6 +22,7 @@ import allure
...
@@ -22,6 +22,7 @@ import allure
from
WorkApi.APP.Device.device_delete
import
DeviceDelete
from
WorkApi.APP.Device.device_delete
import
DeviceDelete
from
WorkApi.APP.Device.device_get
import
DeviceGet
from
WorkApi.APP.Device.device_get
import
DeviceGet
from
WorkApi.APP.Device.device_status
import
DeviceStatus
from
WorkApi.APP.Device.device_status
import
DeviceStatus
from
WorkApi.APP.Device.device_update
import
DeviceUpdate
from
WorkApi.APP.Experience.Items.experience_items_list
import
ExperienceItemsList
from
WorkApi.APP.Experience.Items.experience_items_list
import
ExperienceItemsList
from
WorkApi.APP.Experience.Problem.experience_problem_list
import
ExperienceProblemList
from
WorkApi.APP.Experience.Problem.experience_problem_list
import
ExperienceProblemList
from
WorkApi.APP.Experience.experience_create
import
ExperienceCreate
from
WorkApi.APP.Experience.experience_create
import
ExperienceCreate
...
@@ -217,7 +218,7 @@ class AppBase(object):
...
@@ -217,7 +218,7 @@ class AppBase(object):
@allure.step
(
"调用接口:device.create"
)
@allure.step
(
"调用接口:device.create"
)
def
device_create
(
self
,
token
=
None
,
hostName
=
None
,
hostType
=
None
,
manageLevel
=
None
,
iplist
=
None
,
dns
=
None
,
def
device_create
(
self
,
token
=
None
,
hostName
=
None
,
hostType
=
None
,
manageLevel
=
None
,
iplist
=
None
,
dns
=
None
,
monitorInterface
=
None
,
monitorType
=
None
,
parentHost
=
None
,
businessIds
=
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
,
ipmiPrivilege
=
None
,
ipmiUsername
=
None
,
ipmiPassword
=
None
,
factoryId
=
None
,
model
=
None
,
version
=
None
,
serialnumber
=
None
,
factoryId
=
None
,
model
=
None
,
version
=
None
,
serialnumber
=
None
,
description
=
None
,
monitorStatus
=
None
):
description
=
None
,
monitorStatus
=
None
):
...
@@ -232,6 +233,42 @@ class AppBase(object):
...
@@ -232,6 +233,42 @@ class AppBase(object):
api
.
monitorType
=
monitorType
api
.
monitorType
=
monitorType
api
.
parentHost
=
parentHost
api
.
parentHost
=
parentHost
api
.
businessIds
=
businessIds
api
.
businessIds
=
businessIds
api
.
hostTypeTree
=
hostTypeTree
api
.
businessTree
=
businessTree
api
.
opsPerson
=
opsPerson
api
.
snmpCommunity
=
snmpCommunity
api
.
ipmiAuthtype
=
ipmiAuthtype
api
.
ipmiPrivilege
=
ipmiPrivilege
api
.
ipmiUsername
=
ipmiUsername
api
.
ipmiPassword
=
ipmiPassword
api
.
factoryId
=
factoryId
api
.
model
=
model
api
.
version
=
version
api
.
serialnumber
=
serialnumber
api
.
description
=
description
api
.
monitorStatus
=
monitorStatus
api
.
get_response
()
return
api
.
response
@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
,
ipmiPrivilege
=
None
,
ipmiUsername
=
None
,
ipmiPassword
=
None
,
factoryId
=
None
,
model
=
None
,
version
=
None
,
serialnumber
=
None
,
description
=
None
,
monitorStatus
=
None
):
api
=
DeviceUpdate
(
_host
=
self
.
host
)
api
.
token
=
token
api
.
hostid
=
hostid
api
.
hostName
=
hostName
api
.
hostType
=
hostType
api
.
manageLevel
=
manageLevel
api
.
iplist
=
iplist
api
.
dns
=
dns
api
.
monitorInterface
=
monitorInterface
api
.
monitorType
=
monitorType
api
.
parentHost
=
parentHost
api
.
businessIds
=
businessIds
api
.
businessTree
=
businessTree
api
.
businessTree
=
businessTree
api
.
opsPerson
=
opsPerson
api
.
opsPerson
=
opsPerson
api
.
snmpCommunity
=
snmpCommunity
api
.
snmpCommunity
=
snmpCommunity
...
...
WorkData/Argus/hosts.py
View file @
61f691c6
...
@@ -38,6 +38,7 @@ class Hosts(Base):
...
@@ -38,6 +38,7 @@ class Hosts(Base):
monitor_interface
=
Column
(
VARCHAR
(
255
),
comment
=
"监控接口 分号隔开"
)
monitor_interface
=
Column
(
VARCHAR
(
255
),
comment
=
"监控接口 分号隔开"
)
monitor_type
=
Column
(
Integer
,
comment
=
"监控方式(1:ip 2:dns)"
)
monitor_type
=
Column
(
Integer
,
comment
=
"监控方式(1:ip 2:dns)"
)
business_ids
=
Column
(
VARCHAR
(
255
),
comment
=
"业务id(对应于zabbix系统的分组)"
)
business_ids
=
Column
(
VARCHAR
(
255
),
comment
=
"业务id(对应于zabbix系统的分组)"
)
host_type_tree
=
Column
(
VARCHAR
(
255
),
comment
=
"类型树"
)
business_tree
=
Column
(
VARCHAR
(
255
),
comment
=
"业务树"
)
business_tree
=
Column
(
VARCHAR
(
255
),
comment
=
"业务树"
)
port
=
Column
(
VARCHAR
(
30
),
comment
=
"服务端口号"
)
port
=
Column
(
VARCHAR
(
30
),
comment
=
"服务端口号"
)
ops_person
=
Column
(
Integer
,
comment
=
"运维人员"
)
ops_person
=
Column
(
Integer
,
comment
=
"运维人员"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment