Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Gambier
slapos.core
Commits
f1767039
Commit
f1767039
authored
Aug 12, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy: add multi-nodes support.
parent
f150f5bb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
435 additions
and
125 deletions
+435
-125
slapos/proxy/schema.sql
slapos/proxy/schema.sql
+17
-6
slapos/proxy/views.py
slapos/proxy/views.py
+95
-82
slapos/tests/slapproxy.py
slapos/tests/slapproxy.py
+323
-37
No files found.
slapos/proxy/schema.sql
View file @
f1767039
--version:10
--version:11
CREATE
TABLE
IF
NOT
EXISTS
software
%
(
version
)
s
(
url
VARCHAR
(
255
)
UNIQUE
);
CREATE
TABLE
IF
NOT
EXISTS
software
%
(
version
)
s
(
url
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
)
DEFAULT
'computer'
,
CONSTRAINT
uniq
PRIMARY
KEY
(
url
,
computer_reference
)
);
CREATE
TABLE
IF
NOT
EXISTS
computer
%
(
version
)
s
(
CREATE
TABLE
IF
NOT
EXISTS
computer
%
(
version
)
s
(
reference
VARCHAR
(
255
),
address
VARCHAR
(
255
),
address
VARCHAR
(
255
),
netmask
VARCHAR
(
255
),
netmask
VARCHAR
(
255
),
CONSTRAINT
uniq
PRIMARY
KEY
(
address
,
netmask
));
CONSTRAINT
uniq
PRIMARY
KEY
(
reference
)
);
CREATE
TABLE
IF
NOT
EXISTS
partition
%
(
version
)
s
(
CREATE
TABLE
IF
NOT
EXISTS
partition
%
(
version
)
s
(
reference
VARCHAR
(
255
)
UNIQUE
,
reference
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
)
DEFAULT
'computer'
,
slap_state
VARCHAR
(
255
)
DEFAULT
'free'
,
slap_state
VARCHAR
(
255
)
DEFAULT
'free'
,
software_release
VARCHAR
(
255
),
software_release
VARCHAR
(
255
),
xml
TEXT
,
xml
TEXT
,
...
@@ -16,11 +24,13 @@ CREATE TABLE IF NOT EXISTS partition%(version)s (
...
@@ -16,11 +24,13 @@ CREATE TABLE IF NOT EXISTS partition%(version)s (
partition_reference
VARCHAR
(
255
),
partition_reference
VARCHAR
(
255
),
requested_by
VARCHAR
(
255
),
-- only used for debugging,
requested_by
VARCHAR
(
255
),
-- only used for debugging,
-- slapproxy does not support proper scope
-- slapproxy does not support proper scope
requested_state
VARCHAR
(
255
)
NOT
NULL
DEFAULT
'started'
requested_state
VARCHAR
(
255
)
NOT
NULL
DEFAULT
'started'
,
CONSTRAINT
uniq
PRIMARY
KEY
(
reference
,
computer_reference
)
);
);
CREATE
TABLE
IF
NOT
EXISTS
slave
%
(
version
)
s
(
CREATE
TABLE
IF
NOT
EXISTS
slave
%
(
version
)
s
(
reference
VARCHAR
(
255
)
UNIQUE
,
reference
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
),
connection_xml
TEXT
,
connection_xml
TEXT
,
hosted_by
VARCHAR
(
255
),
hosted_by
VARCHAR
(
255
),
asked_by
VARCHAR
(
255
)
-- only used for debugging,
asked_by
VARCHAR
(
255
)
-- only used for debugging,
...
@@ -29,6 +39,7 @@ CREATE TABLE IF NOT EXISTS slave%(version)s (
...
@@ -29,6 +39,7 @@ CREATE TABLE IF NOT EXISTS slave%(version)s (
CREATE
TABLE
IF
NOT
EXISTS
partition_network
%
(
version
)
s
(
CREATE
TABLE
IF
NOT
EXISTS
partition_network
%
(
version
)
s
(
partition_reference
VARCHAR
(
255
),
partition_reference
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
),
reference
VARCHAR
(
255
),
reference
VARCHAR
(
255
),
address
VARCHAR
(
255
),
address
VARCHAR
(
255
),
netmask
VARCHAR
(
255
)
netmask
VARCHAR
(
255
)
...
...
slapos/proxy/views.py
View file @
f1767039
This diff is collapsed.
Click to expand it.
slapos/tests/slapproxy.py
View file @
f1767039
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment