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
ee007363
Commit
ee007363
authored
15 years ago
by
Brandon Heller
Browse files
Options
Downloads
Patches
Plain Diff
Add default ip and port for remote controller
parent
60d9ead6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/mn_run.py
+2
-2
2 additions, 2 deletions
bin/mn_run.py
mininet/node.py
+6
-5
6 additions, 5 deletions
mininet/node.py
with
8 additions
and
7 deletions
bin/mn_run.py
+
2
−
2
View file @
ee007363
...
...
@@ -108,10 +108,10 @@ def parse_args(self):
opts
.
add_option
(
'
--verbosity
'
,
'
-v
'
,
type
=
'
choice
'
,
choices
=
LEVELS
.
keys
(),
default
=
'
info
'
,
help
=
'
[
'
+
'
'
.
join
(
LEVELS
.
keys
())
+
'
]
'
)
opts
.
add_option
(
'
--ip
'
,
type
=
'
string
'
,
opts
.
add_option
(
'
--ip
'
,
type
=
'
string
'
,
default
=
'
127.0.0.1
'
,
help
=
'
[ip address as a dotted decimal string for a
'
'
remote controller]
'
)
opts
.
add_option
(
'
--port
'
,
type
=
'
string
'
,
opts
.
add_option
(
'
--port
'
,
type
=
'
string
'
,
default
=
6633
,
help
=
'
[port integer for a listening remote
'
'
controller]
'
)
self
.
options
=
opts
.
parse_args
()[
0
]
...
...
This diff is collapsed.
Click to expand it.
mininet/node.py
+
6
−
5
View file @
ee007363
...
...
@@ -320,7 +320,8 @@ def start(self, controllers):
'
'
.
join
(
self
.
intfs
))
# Run protocol daemon
self
.
cmdPrint
(
'
ofprotocol nl:
'
+
str
(
self
.
dp
)
+
'
tcp:
'
+
controllers
[
'
c0
'
].
IP
()
+
'
:
'
+
str
(
controllers
[
'
c0
'
].
port
)
+
controllers
[
'
c0
'
].
IP
()
+
'
:
'
+
str
(
controllers
[
'
c0
'
].
port
)
+
'
--fail=closed 1>
'
+
ofplog
+
'
2>
'
+
ofplog
+
'
&
'
)
self
.
execed
=
False
# XXX until I fix it
...
...
@@ -406,9 +407,11 @@ def __init__(self, name, inNamespace = False, nox_args = None, **kwargs):
'
'
.
join
(
nox_args
),
cdir
=
nox_core_dir
,
**
kwargs
)
class
RemoteController
(
Controller
):
'''
Controller running remotely.
'''
def
__init__
(
self
,
name
,
inNamespace
=
False
,
ip_address
=
None
,
port
=
6633
):
'''
Controller running outside of Mininet
'
s control.
'''
def
__init__
(
self
,
name
,
inNamespace
=
False
,
ip_address
=
'
127.0.0.1
'
,
port
=
6633
):
'''
Init.
@param name name to give controller
...
...
@@ -416,8 +419,6 @@ def __init__(self, name, inNamespace = False, ip_address = None, port = 6633):
listening
@param port the port where the remote controller is listening
'''
if
not
ip_address
:
raise
Exception
(
'
please set ip_address
\n
'
)
Controller
.
__init__
(
self
,
name
,
ip_address
=
ip_address
,
port
=
port
)
def
start
(
self
):
...
...
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