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
1b955864
Commit
1b955864
authored
Dec 19, 2019
by
sanshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规则
parent
c802d5cd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
24 deletions
+24
-24
test_rule_create.py
WorkCase/APP/Rule/test_rule_create.py
+8
-8
test_rule_delete.py
WorkCase/APP/Rule/test_rule_delete.py
+4
-4
test_rule_get.py
WorkCase/APP/Rule/test_rule_get.py
+5
-5
test_rule_list.py
WorkCase/APP/Rule/test_rule_list.py
+4
-4
test_rule_update.py
WorkCase/APP/Rule/test_rule_update.py
+3
-3
No files found.
WorkCase/APP/Rule/test_rule_create.py
View file @
1b955864
...
...
@@ -48,8 +48,8 @@ class TestRuleCreate(object):
base_type_agent
=
126
base_type_snmp
=
127
base_business_id_1
=
"12"
base_business_id_2
=
"13"
base_business_id_1
=
12
base_business_id_2
=
13
base_ip
=
"172.16.3.170"
base_dns
=
"sanshi.zmops.com"
base_port
=
161
...
...
@@ -198,7 +198,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"04"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
@@ -219,7 +219,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"05"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"agent.ping"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
response
=
self
.
app
.
rule_create
(
token
=
self
.
token
,
name
=
name
,
severity
=
0
,
status
=
0
,
manualClose
=
1
,
triggersList_hostid
=
[
host_id
],
...
...
@@ -236,7 +236,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"06"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"agent.ping"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
response
=
self
.
app
.
rule_create
(
token
=
self
.
token
,
name
=
name
,
severity
=
0
,
status
=
0
,
manualClose
=
1
,
triggersList_hostid
=
[
host_id
],
...
...
@@ -253,7 +253,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"07"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_snmp
,
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
]
)
item_key
=
"icmpping"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
response
=
self
.
app
.
rule_create
(
token
=
self
.
token
,
name
=
name
,
severity
=
0
,
status
=
0
,
manualClose
=
1
,
triggersList_hostid
=
[
host_id
],
...
...
@@ -270,7 +270,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"08"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_snmp
,
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
]
)
item_key
=
"icmpping"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
response
=
self
.
app
.
rule_create
(
token
=
self
.
token
,
name
=
name
,
severity
=
0
,
status
=
0
,
manualClose
=
1
,
triggersList_hostid
=
[
host_id
],
...
...
@@ -287,7 +287,7 @@ class TestRuleCreate(object):
name
=
self
.
base_name
+
"09"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
WorkCase/APP/Rule/test_rule_delete.py
View file @
1b955864
...
...
@@ -49,8 +49,8 @@ class TestRuleDelete(object):
base_type_agent
=
126
base_type_snmp
=
127
base_business_id_1
=
"12"
base_business_id_2
=
"13"
base_business_id_1
=
12
base_business_id_2
=
13
base_ip
=
"172.16.3.170"
base_dns
=
"sanshi.zmops.com"
base_port
=
161
...
...
@@ -181,7 +181,7 @@ class TestRuleDelete(object):
name
=
self
.
base_name
+
"04"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
@@ -207,7 +207,7 @@ class TestRuleDelete(object):
name_3
=
self
.
base_name
+
"053"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
WorkCase/APP/Rule/test_rule_get.py
View file @
1b955864
...
...
@@ -48,8 +48,8 @@ class TestRuleGet(object):
base_type_agent
=
126
base_type_snmp
=
127
base_business_id_1
=
"12"
base_business_id_2
=
"13"
base_business_id_1
=
12
base_business_id_2
=
13
base_ip
=
"172.16.3.170"
base_dns
=
"sanshi.zmops.com"
base_port
=
161
...
...
@@ -166,7 +166,7 @@ class TestRuleGet(object):
name
=
self
.
base_name
+
"05"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
@@ -185,7 +185,7 @@ class TestRuleGet(object):
name
=
self
.
base_name
+
"06"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
@@ -206,7 +206,7 @@ class TestRuleGet(object):
name
=
self
.
base_name
+
"07"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
WorkCase/APP/Rule/test_rule_list.py
View file @
1b955864
...
...
@@ -50,8 +50,8 @@ class TestRuleList(object):
base_type_agent
=
126
base_type_snmp
=
127
base_business_id_1
=
"12"
base_business_id_2
=
"13"
base_business_id_1
=
12
base_business_id_2
=
13
base_ip
=
"172.16.3.170"
base_dns
=
"sanshi.zmops.com"
base_port
=
161
...
...
@@ -172,7 +172,7 @@ class TestRuleList(object):
name
=
self
.
base_name
+
"05"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
@@ -191,7 +191,7 @@ class TestRuleList(object):
name
=
self
.
base_name
+
"06"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
WorkCase/APP/Rule/test_rule_update.py
View file @
1b955864
...
...
@@ -49,8 +49,8 @@ class TestRuleUpdate(object):
base_type_agent
=
126
base_type_snmp
=
127
base_business_id_1
=
"12"
base_business_id_2
=
"13"
base_business_id_1
=
12
base_business_id_2
=
13
base_ip
=
"172.16.3.170"
base_dns
=
"sanshi.zmops.com"
base_port
=
161
...
...
@@ -190,7 +190,7 @@ class TestRuleUpdate(object):
name
=
self
.
base_name
+
"04"
host_id
=
self
.
app
.
case_create_host
(
name
=
host_name
,
host_type
=
self
.
base_type_agent
,
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
]
)
item_key
=
"system.cpu.load[percpu,avg15]"
self
.
get_case
(
host_id
=
host_id
,
item_key
=
item_key
)
...
...
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