Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
opennsa3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Hažlinský
opennsa3
Commits
55b6d817
Commit
55b6d817
authored
12 years ago
by
Henrik Thostrup Jensen
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
datafiles/schema.sql
+1
-1
1 addition, 1 deletion
datafiles/schema.sql
opennsa/aggregator.py
+2
-2
2 additions, 2 deletions
opennsa/aggregator.py
opennsa/database.py
+4
-4
4 additions, 4 deletions
opennsa/database.py
test/test_aggregator.py
+1
-1
1 addition, 1 deletion
test/test_aggregator.py
with
8 additions
and
8 deletions
datafiles/schema.sql
+
1
−
1
View file @
55b6d817
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
opennsa/aggregator.py
+
2
−
2
View file @
55b6d817
...
@@ -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
.
s
ub
c
onnections
.
get
()
sub_connections
=
yield
conn
.
S
ub
C
onnections
.
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
.
Sub
c
onnection
(
provider_nsa
=
link_provider_nsa
.
urn
(),
sc
=
database
.
Sub
C
onnection
(
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
,
...
...
This diff is collapsed.
Click to expand it.
opennsa/database.py
+
4
−
4
View file @
55b6d817
...
@@ -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
=
[
'
s
ub
c
onnections
'
]
HASMANY
=
[
'
S
ub
C
onnections
'
]
class
Sub
c
onnection
(
DBObject
):
class
Sub
C
onnection
(
DBObject
):
BELONGSTO
=
[
'
s
ervice
c
onnection
'
]
BELONGSTO
=
[
'
S
ervice
C
onnection
'
]
Registry
.
register
(
ServiceConnection
,
Sub
c
onnection
)
Registry
.
register
(
ServiceConnection
,
Sub
C
onnection
)
This diff is collapsed.
Click to expand it.
test/test_aggregator.py
+
1
−
1
View file @
55b6d817
...
@@ -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
.
Sub
c
onnection
.
deleteAll
()
yield
database
.
Sub
C
onnection
.
deleteAll
()
yield
database
.
ServiceConnection
.
deleteAll
()
yield
database
.
ServiceConnection
.
deleteAll
()
yield
self
.
backend
.
stopService
()
yield
self
.
backend
.
stopService
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment