forked from childe/simplepython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpassparam.py
More file actions
58 lines (52 loc) · 1.18 KB
/
passparam.py
File metadata and controls
58 lines (52 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def info_supplement(pool):
if len(pool['servers']) >= 20:
pool['big'] = True
else:
pool['big'] = False
def testfunc(n):
n = 2
print n
def test_num():
n = 10
testfunc(n)
print n
def test_obj():
pool = {
"department": {
"organization_id": 43,
"alias": "\u673a\u7968",
"name": "FLT"
},
"productline": {
"organization_id": 43,
"alias": "\u673a\u7968",
"name": "FLT"
},
"pool": {
"pool_type": "0",
"id": 350,
"name": "gds.engine.flight"
},
"servers": [
{
"ip": "10.8.89.60",
"hostname": "VMS01860",
"idc": "SHAJQ"
},
{
"ip": "10.8.89.59",
"hostname": "VMS01859",
"idc": "SHAJQ"
},
{
"ip": "10.8.89.58",
"hostname": "VMS01858",
"idc": "SHAJQ"
}
]
}
info_supplement(pool)
if __name__ == '__main__':
test_num()