diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-26 17:10:06 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-26 17:10:06 +0200 |
| commit | 44f0bd378763f4c481fb8a87847ca84469b35a67 (patch) | |
| tree | d9517715e54b635ebd068ab3041afc60c2b30c62 /opendc/models/machine.py | |
| parent | a1589e75358558eada7ffc2efc7e3fa7160d233e (diff) | |
Copy over topology_ids on branch
Diffstat (limited to 'opendc/models/machine.py')
| -rw-r--r-- | opendc/models/machine.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/opendc/models/machine.py b/opendc/models/machine.py index 0d9fbd54..f233d329 100644 --- a/opendc/models/machine.py +++ b/opendc/models/machine.py @@ -15,14 +15,15 @@ class Machine(Model): 'cpuIds': 'cpu_ids', 'gpuIds': 'gpu_ids', 'memoryIds': 'memory_ids', - 'storageIds': 'storage_ids' + 'storageIds': 'storage_ids', + 'topologyId': 'topology_id' } } PATH = '/v1/tiles/{tileId}/rack/machines' TABLE_NAME = 'machines' - COLUMNS = ['id', 'rack_id', 'position'] + COLUMNS = ['id', 'rack_id', 'position', 'topology_id'] COLUMNS_PRIMARY_KEY = ['id'] device_table_to_attribute = { @@ -37,11 +38,6 @@ class Machine(Model): for device_table in self.device_table_to_attribute.keys(): - # First, create the statements to execute - - statements = [] - values = [] - # First, delete current machine-device links statement = 'DELETE FROM machine_{} WHERE machine_id = %s'.format(device_table) |
