File: SoftLayer_Virtual_DedicatedHost.py

package info (click to toggle)
python-softlayer 6.2.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,508 kB
  • sloc: python: 57,195; makefile: 133; xml: 97; sh: 59
file content (134 lines) | stat: -rw-r--r-- 3,781 bytes parent folder | download | duplicates (4)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
getObject = {
    'id': 37401,
    'memoryCapacity': 242,
    'modifyDate': '',
    'name': 'test-dedicated',
    'diskCapacity': 1200,
    'createDate': '2017-10-16T12:50:23-05:00',
    'cpuCount': 56,
    'accountId': 1199911
}


getAvailableRouters = [
    {'hostname': 'bcr01a.dal05', 'id': 12345},
    {'hostname': 'bcr02a.dal05', 'id': 12346},
    {'hostname': 'bcr03a.dal05', 'id': 12347},
    {'hostname': 'bcr04a.dal05', 'id': 12348}
]

getObjectById = {
    'datacenter': {
        'id': 12345,
        'name': 'dal05',
        'longName': 'Dallas 5'
    },
    'memoryCapacity': 242,
    'modifyDate': '2017-11-06T11:38:20-06:00',
    'name': 'test-dedicated',
    'diskCapacity': 1200,
    'backendRouter': {
        'domain': 'test.com',
        'hostname': 'bcr01a.dal05',
        'id': 12345
    },
    'guestCount': 1,
    'cpuCount': 56,
    'guests': [{
        'domain': 'test.com',
        'hostname': 'test-dedicated',
        'id': 12345,
        'uuid': 'F9329795-4220-4B0A-B970-C86B950667FA'
    }],
    'billingItem': {
        'nextInvoiceTotalRecurringAmount': 1515.556,
        'orderItem': {
            'id': 12345,
            'order': {
                'status': 'APPROVED',
                'privateCloudOrderFlag': False,
                'modifyDate': '2017-11-02T11:42:50-07:00',
                'orderQuoteId': '',
                'userRecordId': 12345,
                'createDate': '2017-11-02T11:40:56-07:00',
                'impersonatingUserRecordId': '',
                'orderTypeId': 7,
                'presaleEventId': '',
                'userRecord': {
                    'username': 'test-dedicated'
                },
                'id': 12345,
                'accountId': 12345
            }
        },
        'id': 12345,
        'children': [
            {
                'nextInvoiceTotalRecurringAmount': 0.0,
                'categoryCode': 'dedicated_host_ram'
            },
            {
                'nextInvoiceTotalRecurringAmount': 0.0,
                'categoryCode': 'dedicated_host_disk'
            }
        ]
    },
    'id': 12345,
    'createDate': '2017-11-02T11:40:56-07:00'
}

deleteObject = True

getGuests = [{
    'id': 200,
    'hostname': 'vs-test1',
    'domain': 'test.sftlyr.ws',
    'fullyQualifiedDomainName': 'vs-test1.test.sftlyr.ws',
    'status': {'keyName': 'ACTIVE', 'name': 'Active'},
    'datacenter': {'id': 50, 'name': 'TEST00',
                   'description': 'Test Data Center'},
    'powerState': {'keyName': 'RUNNING', 'name': 'Running'},
    'maxCpu': 2,
    'maxMemory': 1024,
    'primaryIpAddress': '172.16.240.2',
    'globalIdentifier': '1a2b3c-1701',
    'primaryBackendIpAddress': '10.45.19.37',
    'hourlyBillingFlag': False,
    'billingItem': {
        'id': 6327,
        'recurringFee': 1.54,
        'orderItem': {
            'order': {
                'userRecord': {
                    'username': 'chechu',
                }
            }
        }
    },
}, {
    'id': 202,
    'hostname': 'vs-test2',
    'domain': 'test.sftlyr.ws',
    'fullyQualifiedDomainName': 'vs-test2.test.sftlyr.ws',
    'status': {'keyName': 'ACTIVE', 'name': 'Active'},
    'datacenter': {'id': 50, 'name': 'TEST00',
                   'description': 'Test Data Center'},
    'powerState': {'keyName': 'RUNNING', 'name': 'Running'},
    'maxCpu': 4,
    'maxMemory': 4096,
    'primaryIpAddress': '172.16.240.7',
    'globalIdentifier': '05a8ac-6abf0',
    'primaryBackendIpAddress': '10.45.19.35',
    'hourlyBillingFlag': True,
    'billingItem': {
        'id': 6327,
        'recurringFee': 1.54,
        'orderItem': {
            'order': {
                'userRecord': {
                    'username': 'chechu',
                }
            }
        }
    }
}]