File: SoftLayer_Search.py

package info (click to toggle)
python-softlayer 6.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,100 kB
  • sloc: python: 53,771; makefile: 289; sh: 57
file content (51 lines) | stat: -rw-r--r-- 1,716 bytes parent folder | download
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
advancedSearch = [
    {
        "relevanceScore": "4",
        "resourceType": "SoftLayer_Hardware",
        "resource": {
            "accountId": 307608,
            "domain": "vmware.test.com",
            "fullyQualifiedDomainName": "host14.vmware.test.com",
            "hardwareStatusId": 5,
            "hostname": "host14",
            "id": 123456,
            "manufacturerSerialNumber": "AAAAAAAAA",
            "notes": "A test notes",
            "provisionDate": "2018-08-24T12:32:10-06:00",
            "serialNumber": "SL12345678",
            "serviceProviderId": 1,
            "hardwareStatus": {
                "id": 5,
                "status": "ACTIVE"
            }
        }
    }
]

search = advancedSearch

getObjectTypes = [{"name": "SoftLayer_Event_Log",
                   "properties": [
                       {
                           "name": "accountId",
                           "sortableFlag": True,
                           "type": "integer"
                       }]},
                  {"name": "SoftLayer_Hardware",
                   "properties": [
                       {
                           "name": "accountId",
                           "sortableFlag": True,
                           "type": "integer"
                       },
                       {
                           "name": "datacenter.longName",
                           "sortableFlag": True,
                           "type": "string"
                       },
                       {
                           "name": "deviceStatus.name",
                           "sortableFlag": True,
                           "type": "string"
                       }]
                   }]