Skip to content
Snippets Groups Projects
Commit 55b6d817 authored by Henrik Thostrup Jensen's avatar Henrik Thostrup Jensen
Browse files

rename subconnetions table in order to get proper class name and consistent naming

parent 3411832b
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,7 @@ CREATE TABLE service_connections ( ...@@ -33,7 +33,7 @@ CREATE TABLE service_connections (
); );
-- internal references to connections that are part of a service connection -- internal references to connections that are part of a service connection
CREATE TABLE subconnections ( CREATE TABLE sub_connections (
id serial PRIMARY KEY, id serial PRIMARY KEY,
service_connection_id integer NOT NULL REFERENCES service_connections(id), service_connection_id integer NOT NULL REFERENCES service_connections(id),
connection_id text NOT NULL, connection_id text NOT NULL,
......
...@@ -223,7 +223,7 @@ class Aggregator: ...@@ -223,7 +223,7 @@ class Aggregator:
# only works for calls where handler args is: requester, provider, security_attrs, connection_id # only works for calls where handler args is: requester, provider, security_attrs, connection_id
# this happens to be quite a lot though # this happens to be quite a lot though
sub_connections = yield conn.subconnections.get() sub_connections = yield conn.SubConnections.get()
defs = [] defs = []
...@@ -359,7 +359,7 @@ class Aggregator: ...@@ -359,7 +359,7 @@ class Aggregator:
# should probably do some sanity checks here # should probably do some sanity checks here
sp = service_params sp = service_params
local_link = True if link_provider_nsa == self.nsa_ else False local_link = True if link_provider_nsa == self.nsa_ else False
sc = database.Subconnection(provider_nsa=link_provider_nsa.urn(), sc = database.SubConnection(provider_nsa=link_provider_nsa.urn(),
connection_id=connection_id, local_link=local_link, revision=0, service_connection_id=conn.id, order_id=order_id, connection_id=connection_id, local_link=local_link, revision=0, service_connection_id=conn.id, order_id=order_id,
global_reservation_id=global_reservation_id, description=description, global_reservation_id=global_reservation_id, description=description,
reservation_state=state.RESERVE_HELD, provision_state=state.SCHEDULED, activation_state=state.INACTIVE, lifecycle_state=state.INITIAL, reservation_state=state.RESERVE_HELD, provision_state=state.SCHEDULED, activation_state=state.INACTIVE, lifecycle_state=state.INITIAL,
......
...@@ -74,12 +74,12 @@ def setupDatabase(database, user, password=None): ...@@ -74,12 +74,12 @@ def setupDatabase(database, user, password=None):
# ORM Objects # ORM Objects
class ServiceConnection(DBObject): class ServiceConnection(DBObject):
HASMANY = ['subconnections'] HASMANY = ['SubConnections']
class Subconnection(DBObject): class SubConnection(DBObject):
BELONGSTO = ['serviceconnection'] BELONGSTO = ['ServiceConnection']
Registry.register(ServiceConnection, Subconnection) Registry.register(ServiceConnection, SubConnection)
...@@ -72,7 +72,7 @@ class DUDBackendTest(unittest.TestCase): ...@@ -72,7 +72,7 @@ class DUDBackendTest(unittest.TestCase):
from opennsa.backends.common import simplebackend from opennsa.backends.common import simplebackend
# keep it simple... # keep it simple...
yield simplebackend.Simplebackendconnection.deleteAll() yield simplebackend.Simplebackendconnection.deleteAll()
yield database.Subconnection.deleteAll() yield database.SubConnection.deleteAll()
yield database.ServiceConnection.deleteAll() yield database.ServiceConnection.deleteAll()
yield self.backend.stopService() yield self.backend.stopService()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment