From f589682b0840aab0624122052eb863cf8dc3a0b9 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Sun, 13 Aug 2017 23:12:16 +0300 Subject: Convert API codebase to flat model --- opendc/models/machine.py | 2 +- opendc/models/rack.py | 2 +- opendc/models/room.py | 2 +- opendc/models/tile.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'opendc/models') diff --git a/opendc/models/machine.py b/opendc/models/machine.py index 52cf221b..54838ffd 100644 --- a/opendc/models/machine.py +++ b/opendc/models/machine.py @@ -19,7 +19,7 @@ class Machine(Model): } } - PATH = '/v1/simulations/{simulationId}/datacenters/{datacenterId}/rooms/{roomId}/tiles/{tileId}/rack/machines' + PATH = '/v1/tiles/{tileId}/rack/machines' TABLE_NAME = 'machines' COLUMNS = ['id', 'rack_id', 'position'] diff --git a/opendc/models/rack.py b/opendc/models/rack.py index a9aeeff9..b547afa1 100644 --- a/opendc/models/rack.py +++ b/opendc/models/rack.py @@ -14,7 +14,7 @@ class Rack(Model): } } - PATH = '/v1/simulations/{simulationId}/datacenters/{datacenterId}/rooms/{roomId}/tiles/{tileId}/rack' + PATH = '/v1/tiles/{tileId}/rack' TABLE_NAME = 'racks' COLUMNS = ['id', 'name', 'capacity', 'power_capacity_w'] diff --git a/opendc/models/room.py b/opendc/models/room.py index b8be88f9..76f9f7b3 100644 --- a/opendc/models/room.py +++ b/opendc/models/room.py @@ -13,7 +13,7 @@ class Room(Model): } } - PATH = '/v1/simulations/{simulationId}/datacenters/{datacenterId}/rooms' + PATH = '/v1/datacenters/{datacenterId}/rooms' TABLE_NAME = 'rooms' COLUMNS = ['id', 'name', 'datacenter_id', 'type'] diff --git a/opendc/models/tile.py b/opendc/models/tile.py index 95445419..748c76c5 100644 --- a/opendc/models/tile.py +++ b/opendc/models/tile.py @@ -16,7 +16,7 @@ class Tile(Model): } } - PATH = '/v1/simulations/{simulationId}/datacenters/{datacenterId}/rooms/{roomId}/tiles' + PATH = '/v1/rooms/{roomId}/tiles' TABLE_NAME = 'tiles' COLUMNS = ['id', 'position_x', 'position_y', 'room_id', 'object_id'] -- cgit v1.2.3