-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnest.py
More file actions
45 lines (41 loc) · 1019 Bytes
/
nest.py
File metadata and controls
45 lines (41 loc) · 1019 Bytes
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
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"
}
]
}
# 这里并没有生成新的对象!
# 只是把department指向了pool["department"]这个已经存在的东西.
department = pool["department"]
department["organization_id"] = 44
print pool # department.organization_id变化了