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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
4d8fccfa
Commit
4d8fccfa
authored
Aug 12, 2014
by
Cédric de Saint Martin
Committed by
Rafael Monnerat
Nov 10, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proxy: add multi-nodes support.
parent
82f2b511
Changes
3
Expand all
Show 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 @
4d8fccfa
--version:10
CREATE
TABLE
IF
NOT
EXISTS
software
%
(
version
)
s
(
url
VARCHAR
(
255
)
UNIQUE
);
--version:11
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
(
reference
VARCHAR
(
255
),
address
VARCHAR
(
255
),
netmask
VARCHAR
(
255
),
CONSTRAINT
uniq
PRIMARY
KEY
(
address
,
netmask
));
CONSTRAINT
uniq
PRIMARY
KEY
(
reference
)
);
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'
,
software_release
VARCHAR
(
255
),
xml
TEXT
,
...
...
@@ -16,11 +24,13 @@ CREATE TABLE IF NOT EXISTS partition%(version)s (
partition_reference
VARCHAR
(
255
),
requested_by
VARCHAR
(
255
),
-- only used for debugging,
-- 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
(
reference
VARCHAR
(
255
)
UNIQUE
,
reference
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
),
connection_xml
TEXT
,
hosted_by
VARCHAR
(
255
),
asked_by
VARCHAR
(
255
)
-- only used for debugging,
...
...
@@ -29,6 +39,7 @@ CREATE TABLE IF NOT EXISTS slave%(version)s (
CREATE
TABLE
IF
NOT
EXISTS
partition_network
%
(
version
)
s
(
partition_reference
VARCHAR
(
255
),
computer_reference
VARCHAR
(
255
),
reference
VARCHAR
(
255
),
address
VARCHAR
(
255
),
netmask
VARCHAR
(
255
)
...
...
slapos/proxy/views.py
View file @
4d8fccfa
This diff is collapsed.
Click to expand it.
slapos/tests/slapproxy.py
View file @
4d8fccfa
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