Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mininet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Olaf Bergmann
mininet
Commits
222e87da
Commit
222e87da
authored
10 years ago
by
Bob Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Rearrange init code slightly.
parent
a89ccb78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/cluster.py
+8
-9
8 additions, 9 deletions
examples/cluster.py
with
8 additions
and
9 deletions
examples/cluster.py
+
8
−
9
View file @
222e87da
...
@@ -125,21 +125,20 @@ def __init__( self, name, server='localhost', user=None, serverIP=None,
...
@@ -125,21 +125,20 @@ def __init__( self, name, server='localhost', user=None, serverIP=None,
self
.
server
=
server
if
server
else
'
localhost
'
self
.
server
=
server
if
server
else
'
localhost
'
self
.
serverIP
=
serverIP
if
serverIP
else
self
.
findServerIP
(
self
.
server
)
self
.
serverIP
=
serverIP
if
serverIP
else
self
.
findServerIP
(
self
.
server
)
self
.
user
=
user
if
user
else
self
.
findUser
()
self
.
user
=
user
if
user
else
self
.
findUser
()
self
.
controlPath
=
controlPath
self
.
splitInit
=
splitInit
if
self
.
user
and
self
.
server
!=
'
localhost
'
:
if
self
.
user
and
self
.
server
!=
'
localhost
'
:
self
.
dest
=
'
%s@%s
'
%
(
self
.
user
,
self
.
serverIP
)
self
.
dest
=
'
%s@%s
'
%
(
self
.
user
,
self
.
serverIP
)
self
.
isRemote
=
True
else
:
self
.
isRemote
=
False
self
.
dest
=
None
self
.
controlPath
=
controlPath
self
.
sshcmd
=
[]
if
hasattr
(
self
,
'
server
'
)
and
self
.
isRemote
:
self
.
sshcmd
=
[
'
sudo
'
,
'
-E
'
,
'
-u
'
,
self
.
user
]
+
self
.
sshbase
self
.
sshcmd
=
[
'
sudo
'
,
'
-E
'
,
'
-u
'
,
self
.
user
]
+
self
.
sshbase
if
self
.
controlPath
:
if
self
.
controlPath
:
self
.
sshcmd
+=
[
'
-o
'
,
'
ControlPath=
'
+
self
.
controlPath
,
self
.
sshcmd
+=
[
'
-o
'
,
'
ControlPath=
'
+
self
.
controlPath
,
'
-o
'
,
'
ControlMaster=auto
'
]
'
-o
'
,
'
ControlMaster=auto
'
]
self
.
sshcmd
=
self
.
sshcmd
+
[
self
.
dest
]
self
.
sshcmd
=
self
.
sshcmd
+
[
self
.
dest
]
self
.
splitInit
=
splitInit
self
.
isRemote
=
True
else
:
self
.
dest
=
None
self
.
sshcmd
=
[]
self
.
isRemote
=
False
super
(
RemoteMixin
,
self
).
__init__
(
name
,
**
kwargs
)
super
(
RemoteMixin
,
self
).
__init__
(
name
,
**
kwargs
)
@staticmethod
@staticmethod
...
...
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