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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
64 deletions
+53
-64
.idea/workspace.xml
+50
-63
circle/dashboard/views/vm.py
+3
-1
No files found.
.idea/workspace.xml
View file @
344674c6
...
...
@@ -2,10 +2,7 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/forms.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
afterPath=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/vm/operations.py"
afterPath=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -31,28 +28,18 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
operations
.py"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
vm/operations
.py"
>
<file
leaf-file-name=
"
vm
.py"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/vm
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
30
1"
>
<caret
line=
"
189"
column=
"0"
lean-forward=
"false"
selection-start-line=
"189"
selection-start-column=
"0"
selection-end-line=
"189"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
9
1"
>
<caret
line=
"
356"
column=
"84"
lean-forward=
"false"
selection-start-line=
"356"
selection-start-column=
"84"
selection-end-line=
"356"
selection-end-column=
"84
"
/>
<folding>
<element
signature=
"e#
732#788#0"
expanded=
"tru
e"
/>
<element
signature=
"e#
40828#41999#0"
expanded=
"fals
e"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"nova.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/openstack_api/nova.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"205"
>
<caret
line=
"1004"
column=
"0"
lean-forward=
"false"
selection-start-line=
"1004"
selection-start-column=
"0"
selection-end-line=
"1004"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component
name=
"FileTemplateManagerImpl"
>
...
...
@@ -160,9 +147,9 @@
<option
value=
"$PROJECT_DIR$/circle/common/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
</list>
</option>
</component>
...
...
@@ -252,7 +239,7 @@
<property
name=
"settings.editor.selected.configurable"
value=
"watcher.settings"
/>
<property
name=
"NewWatcherDialog.advanced.open"
value=
"true"
/>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py server	null	null Instance	null	null instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operat	null	null ins	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py vmdetai	null	null index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html operationvi	null	null ser	null	null server.	FILE	file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py resources.	FILE	file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html vm-de	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html vxla	null	null urls	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py index-v	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html index-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html opera	null	null vmdeta	null	null create	FILE	file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py vxl	null	null nov	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py nova.p	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py vmdetailv	null	null editor	null	null networktopo	FILE	file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js bow	FILE	file:///home/h3yduck/cloud/circle/bower.json base.py	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	null	null vnc	null	null plain	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html forms	null	null vxlanform	null	null instanc	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py index-vxla	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html _vm-c	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/_vm-create-1.html vmcrea	null	null loginV	null	null index.html	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html sleep	null	null Deploy	null	null Vmdeta	null	null list_from	null	null aclupda	null	null base.htm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/base.html method	ACTION	GoToMenuEx base.ht	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/base.html base.html	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard
/base.html"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
addinterfa	null	null addin	null	null server	null	null Instance	null	null instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operat	null	null ins	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py vmdetai	null	null index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html operationvi	null	null ser	null	null server.	FILE	file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py resources.	FILE	file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html vm-de	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html vxla	null	null urls	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py index-v	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html index-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html opera	null	null vmdeta	null	null create	FILE	file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py vxl	null	null nov	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py nova.p	FILE	file:///home/h3yduck/cloud/circle/openstack_api/nova.py vmdetailv	null	null editor	null	null networktopo	FILE	file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js bow	FILE	file:///home/h3yduck/cloud/circle/bower.json base.py	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	null	null vnc	null	null plain	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html forms	null	null vxlanform	null	null instanc	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py index-vxla	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html _vm-c	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/_vm-create-1.html vmcrea	null	null loginV	null	null index.html	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html sleep	null	null Deploy	null	null Vmdeta	null	null list_from	null	null aclupda	null	null base.htm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/base.html method	ACTION	GoToMenuEx base.ht	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates
/base.html"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
...
@@ -387,7 +374,7 @@
<window_info
id=
"SciView"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Structure"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Favorites"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"2"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Debug"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
true"
show_stripe_button=
"true"
weight=
"0.29598308
"
sideWeight=
"0.5101172"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Debug"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"
false"
show_stripe_button=
"true"
weight=
"0.7114165
"
sideWeight=
"0.5101172"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Cvs"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"4"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Messages"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Message"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.33"
sideWeight=
"0.5"
order=
"0"
side_tool=
"false"
content_ui=
"tabs"
/>
...
...
@@ -471,7 +458,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option
name=
"time"
value=
"21
1
"
/>
<option
name=
"time"
value=
"21
5
"
/>
</breakpoint-manager>
<watches-manager
/>
</component>
...
...
@@ -504,22 +491,22 @@
</expressions>
<expressions
id=
"evaluateExpression"
>
<expression>
<expression-string>
openstack_api.neutron.
network_list_for_tenant(self.request, self.request.user.tenant_id
)
</expression-string>
<expression-string>
openstack_api.neutron.
port_list(self.request, device_id='b8a88d71-f59f-436c-bfc6-c614e6644745'
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
reverse_lazy('dashboard.views.detail', self.get_object().id
)
</expression-string>
<expression-string>
openstack_api.neutron.port_list(self.request, 'b8a88d71-f59f-436c-bfc6-c614e6644745'
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
self
</expression-string>
<expression-string>
openstack_api.neutron.port_list(self.request)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
self.instance
</expression-string>
<expression-string>
openstack_api.neutron.port_list(self.request, {'device-id':'b8a88d71-f59f-436c-bfc6-c614e6644745'})
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
...
...
@@ -529,22 +516,22 @@
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
openstack_api.nova.server_get(self.request, self.kwargs['pk'])
</expression-string>
<expression-string>
self.object.addresses
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
self.model
</expression-string>
<expression-string>
openstack_api.neutron.port_list(request)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
self.model.id
</expression-string>
<expression-string>
openstack_api.neutron.por
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
get_operation_class(type(self), name)(self
)
</expression-string>
<expression-string>
openstack_api.neutron.network_list(
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
...
...
@@ -658,14 +645,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"306"
>
<caret
line=
"836"
column=
"8"
lean-forward=
"false"
selection-start-line=
"836"
selection-start-column=
"8"
selection-end-line=
"836"
selection-end-column=
"8"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/settings/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"862"
>
...
...
@@ -876,14 +855,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/openstack_api/neutron.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"213"
>
<caret
line=
"977"
column=
"4"
lean-forward=
"false"
selection-start-line=
"977"
selection-start-column=
"4"
selection-end-line=
"977"
selection-end-column=
"4"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/forms/models.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"306"
>
...
...
@@ -908,16 +879,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"446"
>
<caret
line=
"361"
column=
"29"
lean-forward=
"true"
selection-start-line=
"361"
selection-start-column=
"29"
selection-end-line=
"361"
selection-end-column=
"29"
/>
<folding>
<element
signature=
"e#40644#41815#0"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/models/instance.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"313"
>
...
...
@@ -942,6 +903,24 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/common/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"205"
>
<caret
line=
"89"
column=
"0"
lean-forward=
"false"
selection-start-line=
"89"
selection-start-column=
"0"
selection-end-line=
"89"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"301"
>
<caret
line=
"189"
column=
"0"
lean-forward=
"false"
selection-start-line=
"189"
selection-start-column=
"0"
selection-end-line=
"189"
selection-end-column=
"0"
/>
<folding>
<element
signature=
"e#732#788#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/openstack_api/nova.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"205"
>
...
...
@@ -950,20 +929,28 @@
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/common/operations
.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/neutronclient/v2_0/client
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
05
"
>
<caret
line=
"
89"
column=
"0"
lean-forward=
"false"
selection-start-line=
"89"
selection-start-column=
"0"
selection-end-line=
"89"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"2
56
"
>
<caret
line=
"
133"
column=
"8"
lean-forward=
"false"
selection-start-line=
"133"
selection-start-column=
"8"
selection-end-line=
"133"
selection-end-column=
"8
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
vm/operations
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/neutron
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"301"
>
<caret
line=
"189"
column=
"0"
lean-forward=
"false"
selection-start-line=
"189"
selection-start-column=
"0"
selection-end-line=
"189"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"247"
>
<caret
line=
"1220"
column=
"37"
lean-forward=
"false"
selection-start-line=
"1220"
selection-start-column=
"37"
selection-end-line=
"1220"
selection-end-column=
"37"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"91"
>
<caret
line=
"356"
column=
"84"
lean-forward=
"false"
selection-start-line=
"356"
selection-start-column=
"84"
selection-end-line=
"356"
selection-end-column=
"84"
/>
<folding>
<element
signature=
"e#
732#788#0"
expanded=
"tru
e"
/>
<element
signature=
"e#
40828#41999#0"
expanded=
"fals
e"
/>
</folding>
</state>
</provider>
...
...
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