Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
tcloud
networking-capnet
Commits
cfd26116
Commit
cfd26116
authored
May 02, 2016
by
David Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support the new split domain metadata file format in capnet 920d68c8.
parent
1d2d34ea
Pipeline
#1179
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
networking_capnet/plugins/ml2/drivers/capnet/capnet_neutron_agent.py
...capnet/plugins/ml2/drivers/capnet/capnet_neutron_agent.py
+9
-13
No files found.
networking_capnet/plugins/ml2/drivers/capnet/capnet_neutron_agent.py
View file @
cfd26116
...
...
@@ -426,19 +426,15 @@ class CapnetControllerMetadataManager(object):
'datapath_id'
:
binding
[
'datapath_id'
],
'binding'
:
binding
}
pass
else
:
if
'domain_id'
in
binding
:
domain_id
=
binding
[
'domain_id'
]
else
:
network_id
=
binding
[
'port'
][
'network_id'
]
tenant_id
=
binding
[
'port'
][
'tenant_id'
]
subnet_id
=
'None'
if
'ipallocation'
in
binding
:
subnet_id
=
binding
[
'ipallocation'
][
'subnet_id'
]
pass
domain_id
=
"%s-%s-%s"
%
(
network_id
,
tenant_id
,
subnet_id
)
network_id
=
binding
[
'port'
][
'network_id'
]
tenant_id
=
binding
[
'port'
][
'tenant_id'
]
subnet_id
=
'None'
if
'ipallocation'
in
binding
:
subnet_id
=
binding
[
'ipallocation'
][
'subnet_id'
]
pass
domain_id
=
"%s-%s"
%
(
network_id
,
subnet_id
)
owner_id
=
tenant_id
mac
=
binding
[
'port'
][
'mac_address'
]
port_id
=
binding
[
'port_id'
]
ipaddr
=
binding
[
'ipallocation'
][
'ip_address'
]
...
...
@@ -446,8 +442,8 @@ class CapnetControllerMetadataManager(object):
nodename
=
ipaddr
or
port_id
# XXX: we currently don't get a mask!
mask
=
'24'
line
=
"node %s %s %s %s %s %s %s %s"
\
%
(
str
(
binding
[
'ofport'
]),
domain_id
,
role
,
port_id
,
nodename
,
mac
,
line
=
"node %s %s %s %s %s %s %s
%s
%s"
\
%
(
str
(
binding
[
'ofport'
]),
domain_id
,
owner_id
,
role
,
port_id
,
nodename
,
mac
,
ipaddr
,
mask
)
md
=
{
'role'
:
role
,
'line'
:
line
,
'mac'
:
mac
,
...
...
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