Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
344674c6
authored
Mar 12, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide interfaces for existing networks in add interface panel
parent
806ecf3e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
.idea/workspace.xml
+0
-0
circle/dashboard/views/vm.py
+3
-1
No files found.
.idea/workspace.xml
View file @
344674c6
This diff is collapsed.
Click to expand it.
circle/dashboard/views/vm.py
View file @
344674c6
...
...
@@ -352,7 +352,9 @@ class VmAddInterfaceView(FormOperationMixin, VmOperationView):
def
get_form_kwargs
(
self
):
context
=
super
(
VmAddInterfaceView
,
self
)
.
get_form_kwargs
()
networks
=
openstack_api
.
neutron
.
network_list_for_tenant
(
self
.
request
,
self
.
request
.
user
.
tenant_id
)
choices
=
((
n
.
id
,
n
.
name
)
for
n
in
networks
)
ports
=
openstack_api
.
neutron
.
port_list
(
self
.
request
)
instance_net_ids
=
[
p
.
network_id
for
p
in
ports
if
p
.
device_id
==
self
.
object
.
id
]
choices
=
[(
n
.
id
,
n
.
name
)
for
n
in
networks
if
n
.
id
not
in
instance_net_ids
]
context
.
update
({
'choices'
:
choices
})
...
...
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