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
Nicolas Wavrant
slapos.core
Commits
0d8decd8
Commit
0d8decd8
authored
Jun 25, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed legacy 'node register' entry point
parent
31a59a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
111 deletions
+1
-111
slapos/cli_legacy/entry.py
slapos/cli_legacy/entry.py
+1
-5
slapos/cli_legacy/register.py
slapos/cli_legacy/register.py
+0
-106
No files found.
slapos/cli_legacy/entry.py
View file @
0d8decd8
...
...
@@ -42,7 +42,6 @@ from slapos.cli_legacy.slapgrid import runSoftwareRelease as software
from
slapos.cli_legacy.slapgrid
import
runUsageReport
as
report
from
slapos.cli_legacy.svcbackend
import
supervisord
from
slapos.cli_legacy.svcbackend
import
supervisorctl
from
slapos.cli_legacy.register
import
main
as
register
from
slapos.version
import
version
# Note: this whole file is a hack. We should better try dedicated library
...
...
@@ -125,9 +124,7 @@ def dispatch(command, is_node_command):
sys
.
stderr
.
write
(
'This command must be run as root.
\
n
'
)
sys
.
exit
()
if
command
==
'register'
:
call
(
register
)
elif
command
==
'software'
:
if
command
==
'software'
:
call
(
software
,
config_path
=
GLOBAL_SLAPOS_CONFIGURATION
,
option
=
[
'--pidfile /opt/slapos/slapgrid-sr.pid'
])
elif
command
==
'instance'
:
...
...
@@ -192,7 +189,6 @@ Client subcommands usage:
slapos console
Node subcommands usage:
slapos node
slapos node register <node-id>
slapos node software
slapos node instance
slapos node report
...
...
slapos/cli_legacy/register.py
deleted
100644 → 0
View file @
31a59a31
# -*- coding: utf-8 -*-
# vim: set et sts=2:
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly advised to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
argparse
import
logging
import
sys
from
slapos.register.register
import
do_register
,
RegisterConfig
def
main
():
ap
=
argparse
.
ArgumentParser
()
ap
.
add_argument
(
'node_name'
,
help
=
'Name of the node'
)
ap
.
add_argument
(
'--interface-name'
,
help
=
'Interface name to access internet'
,
default
=
'eth0'
)
ap
.
add_argument
(
'--master-url'
,
help
=
'URL of SlapOS master'
,
default
=
'https://slap.vifib.com'
)
ap
.
add_argument
(
'--master-url-web'
,
help
=
'URL of SlapOS Master webservice to register certificates'
,
default
=
'https://www.slapos.org'
)
ap
.
add_argument
(
'--partition-number'
,
help
=
'Number of partition on computer'
,
default
=
'10'
,
type
=
int
)
ap
.
add_argument
(
'--ipv4-local-network'
,
help
=
'Base of ipv4 local network'
,
default
=
'10.0.0.0/16'
)
ap
.
add_argument
(
'--ipv6-interface'
,
help
=
'Interface name to get ipv6'
,
default
=
''
)
ap
.
add_argument
(
'--login'
,
help
=
'User login on SlapOS Master webservice'
)
ap
.
add_argument
(
'--password'
,
help
=
'User password on SlapOs Master webservice'
)
ap
.
add_argument
(
'-t'
,
'--create-tap'
,
help
=
'Will trigger creation of one virtual "tap" interface per '
'Partition and attach it to primary interface. Requires '
'primary interface to be a bridge. defaults to false. '
'Needed to host virtual machines.'
,
default
=
False
,
action
=
'store_true'
)
ap
.
add_argument
(
'-n'
,
'--dry-run'
,
help
=
'Simulate the execution steps'
,
default
=
False
,
action
=
'store_true'
)
args
=
ap
.
parse_args
()
if
args
.
password
and
not
args
.
login
:
ap
.
error
(
'Please enter your login with your password'
)
logger
=
logging
.
getLogger
(
'Register'
)
handler
=
logging
.
StreamHandler
()
logger
.
setLevel
(
logging
.
DEBUG
)
handler
.
setLevel
(
logging
.
INFO
)
handler
.
setFormatter
(
logging
.
Formatter
(
'%(levelname)s - %(message)s'
))
logger
.
addHandler
(
handler
)
try
:
conf
=
RegisterConfig
(
logger
=
logger
)
conf
.
setConfig
(
args
)
return_code
=
do_register
(
conf
)
except
SystemExit
as
exc
:
return_code
=
exc
sys
.
exit
(
return_code
)
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