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
63501e0a
authored
Mar 13, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add initial attached networks implementation
parent
344674c6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
104 additions
and
83 deletions
+104
-83
.idea/workspace.xml
+83
-64
circle/dashboard/templates/dashboard/vm-detail/network.html
+3
-19
circle/dashboard/views/util.py
+1
-0
circle/dashboard/views/vm.py
+17
-0
No files found.
.idea/workspace.xml
View file @
63501e0a
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
</list>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
...
@@ -28,13 +31,23 @@
...
@@ -28,13 +31,23 @@
</component>
</component>
<component
name=
"FileEditorManager"
>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"network.html"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"289"
>
<caret
line=
"17"
column=
"32"
lean-forward=
"false"
selection-start-line=
"17"
selection-start-column=
"28"
selection-end-line=
"17"
selection-end-column=
"32"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"vm.py"
pinned=
"false"
current-in-tab=
"true"
>
<file
leaf-file-name=
"vm.py"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
91
"
>
<state
relative-caret-position=
"
416
"
>
<caret
line=
"
356"
column=
"84"
lean-forward=
"false"
selection-start-line=
"356"
selection-start-column=
"84"
selection-end-line=
"356"
selection-end-column=
"84
"
/>
<caret
line=
"
156"
column=
"80"
lean-forward=
"false"
selection-start-line=
"156"
selection-start-column=
"80"
selection-end-line=
"156"
selection-end-column=
"80
"
/>
<folding>
<folding>
<element
signature=
"e#4
0828#41999
#0"
expanded=
"false"
/>
<element
signature=
"e#4
1570#42741
#0"
expanded=
"false"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
@@ -52,10 +65,6 @@
...
@@ -52,10 +65,6 @@
</component>
</component>
<component
name=
"FindInProjectRecents"
>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<findStrings>
<find>
VmAddInterfaceForm
</find>
<find>
states
</find>
<find>
status
</find>
<find>
addinterf
</find>
<find>
polic
</find>
<find>
polic
</find>
<find>
addinterfa
</find>
<find>
addinterfa
</find>
<find>
interface
</find>
<find>
interface
</find>
...
@@ -82,6 +91,10 @@
...
@@ -82,6 +91,10 @@
<find>
addinterface
</find>
<find>
addinterface
</find>
<find>
shut
</find>
<find>
shut
</find>
<find>
addinterfac
</find>
<find>
addinterfac
</find>
<find>
detailview
</find>
<find>
get_object
</find>
<find>
class server
</find>
<find>
vmdetail
</find>
</findStrings>
</findStrings>
<replaceStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
<replace>
'ACTIVE'
</replace>
...
@@ -134,7 +147,6 @@
...
@@ -134,7 +147,6 @@
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/views.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/views.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/models/instance.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/models/instance.py"
/>
...
@@ -145,10 +157,11 @@
...
@@ -145,10 +157,11 @@
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html"
/>
<option
value=
"$PROJECT_DIR$/circle/common/operations.py"
/>
<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/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
</list>
</list>
</option>
</option>
...
@@ -223,7 +236,13 @@
...
@@ -223,7 +236,13 @@
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"dashboard"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"common"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"cloud"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"openstack_api"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</path>
</expand>
</expand>
<select
/>
<select
/>
...
@@ -239,7 +258,7 @@
...
@@ -239,7 +258,7 @@
<property
name=
"settings.editor.selected.configurable"
value=
"watcher.settings"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"watcher.settings"
/>
<property
name=
"NewWatcherDialog.advanced.open"
value=
"true"
/>
<property
name=
"NewWatcherDialog.advanced.open"
value=
"true"
/>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<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"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py vmadd	null	null vmdetail	null	null 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 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"
/>
</component>
</component>
<component
name=
"RecentsManager"
>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
@@ -458,7 +477,7 @@
...
@@ -458,7 +477,7 @@
</properties>
</properties>
</breakpoint>
</breakpoint>
</default-breakpoints>
</default-breakpoints>
<option
name=
"time"
value=
"2
1
5"
/>
<option
name=
"time"
value=
"2
2
5"
/>
</breakpoint-manager>
</breakpoint-manager>
<watches-manager
/>
<watches-manager
/>
</component>
</component>
...
@@ -491,12 +510,12 @@
...
@@ -491,12 +510,12 @@
</expressions>
</expressions>
<expressions
id=
"evaluateExpression"
>
<expressions
id=
"evaluateExpression"
>
<expression>
<expression>
<expression-string>
openstack_api.neutron.port_list(self.request, device_id='b8a88d71-f59f-436c-bfc6-c614e6644745')
</expression-string>
<expression-string>
ports
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
openstack_api.neutron.
port_list(self.request, 'b8a88d71-f59f-436c-bfc6-c614e6644745'
)
</expression-string>
<expression-string>
openstack_api.neutron.
router_list(self.request
)
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
...
@@ -506,32 +525,32 @@
...
@@ -506,32 +525,32 @@
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
openstack_api.neutron.port_list
(self.request, {'device-id':'b8a88d71-f59f-436c-bfc6-c614e6644745'}
)
</expression-string>
<expression-string>
openstack_api.neutron.port_list
_list(self.request
)
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
self.object
</expression-string>
<expression-string>
instance_networks
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
self.object.addresses
</expression-string>
<expression-string>
instance_networks\
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
openstack_api.neutron.port_list(request)
</expression-string>
<expression-string>
self.object
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
openstack_api.neutron.por
</expression-string>
<expression-string>
self
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
<expression>
<expression>
<expression-string>
openstack_api.neutron.network_list()
</expression-string>
<expression-string>
[n for n in all_networks if n.id in instance_net_ids]
</expression-string>
<language-id>
Python
</language-id>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expression>
...
@@ -645,14 +664,6 @@
...
@@ -645,14 +664,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/settings/base.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"862"
>
<caret
line=
"579"
column=
"34"
lean-forward=
"false"
selection-start-line=
"579"
selection-start-column=
"34"
selection-end-line=
"579"
selection-end-column=
"34"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"335"
>
<state
relative-caret-position=
"335"
>
...
@@ -725,14 +736,6 @@
...
@@ -725,14 +736,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"318"
>
<caret
line=
"33"
column=
"23"
lean-forward=
"false"
selection-start-line=
"33"
selection-start-column=
"23"
selection-end-line=
"33"
selection-end-column=
"23"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"493"
>
<state
relative-caret-position=
"493"
>
...
@@ -871,14 +874,6 @@
...
@@ -871,14 +874,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/util.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"323"
>
<caret
line=
"203"
column=
"37"
lean-forward=
"true"
selection-start-line=
"203"
selection-start-column=
"37"
selection-end-line=
"203"
selection-end-column=
"37"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/models/instance.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/models/instance.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"313"
>
<state
relative-caret-position=
"313"
>
...
@@ -903,14 +898,6 @@
...
@@ -903,14 +898,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</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"
>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"301"
>
<state
relative-caret-position=
"301"
>
...
@@ -921,14 +908,6 @@
...
@@ -921,14 +908,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<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>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/neutronclient/v2_0/client.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"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"256"
>
<state
relative-caret-position=
"256"
>
...
@@ -945,12 +924,52 @@
...
@@ -945,12 +924,52 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/util.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"93"
>
<caret
line=
"389"
column=
"38"
lean-forward=
"false"
selection-start-line=
"389"
selection-start-column=
"38"
selection-end-line=
"389"
selection-end-column=
"38"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/common/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"454"
>
<caret
line=
"232"
column=
"0"
lean-forward=
"true"
selection-start-line=
"232"
selection-start-column=
"0"
selection-end-line=
"232"
selection-end-column=
"0"
/>
<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=
"233"
>
<caret
line=
"129"
column=
"25"
lean-forward=
"true"
selection-start-line=
"129"
selection-start-column=
"25"
selection-end-line=
"129"
selection-end-column=
"25"
/>
<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=
"794"
>
<caret
line=
"579"
column=
"34"
lean-forward=
"true"
selection-start-line=
"579"
selection-start-column=
"34"
selection-end-line=
"579"
selection-end-column=
"34"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"289"
>
<caret
line=
"17"
column=
"32"
lean-forward=
"false"
selection-start-line=
"17"
selection-start-column=
"28"
selection-end-line=
"17"
selection-end-column=
"32"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/vm.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
91
"
>
<state
relative-caret-position=
"
416
"
>
<caret
line=
"
356"
column=
"84"
lean-forward=
"false"
selection-start-line=
"356"
selection-start-column=
"84"
selection-end-line=
"356"
selection-end-column=
"84
"
/>
<caret
line=
"
156"
column=
"80"
lean-forward=
"false"
selection-start-line=
"156"
selection-start-column=
"80"
selection-end-line=
"156"
selection-end-column=
"80
"
/>
<folding>
<folding>
<element
signature=
"e#4
0828#41999
#0"
expanded=
"false"
/>
<element
signature=
"e#4
1570#42741
#0"
expanded=
"false"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
...
...
circle/dashboard/templates/dashboard/vm-detail/network.html
View file @
63501e0a
...
@@ -12,32 +12,17 @@
...
@@ -12,32 +12,17 @@
{% trans "Interfaces" %}
{% trans "Interfaces" %}
</h2>
</h2>
{% for i in networks %}
{% for i in instance.interface_set.all %}
<div>
<div>
<h3
class=
"list-group-item-heading dashboard-vm-details-network-h3"
>
<h3
class=
"list-group-item-heading dashboard-vm-details-network-h3"
>
<i
class=
"fa fa-{% if i.host %}globe{% else %}link{% endif %}"
></i>
<i
class=
"fa fa-{% if i.host %}globe{% else %}link{% endif %}"
></i>
{% if i.vxlan %}
{{ i.name }}
{{ i.vxlan.name }} (user)
{% if not i.subnets.0.enable_dhcp %}({% trans "unmanaged" %}){% endif %}
{% else %}
{{ i.vlan.name }}
{% if not i.host%}({% trans "unmanaged" %}){% endif %}
{% endif %}
{% if user.is_superuser and i.host %}
{% if user.is_superuser and i.host %}
<a
href=
"{{ i.host.get_absolute_url }}"
<a
href=
"{{ i.host.get_absolute_url }}"
class=
"btn btn-default btn-xs"
>
{% trans "edit" %}
</a>
class=
"btn btn-default btn-xs"
>
{% trans "edit" %}
</a>
{% endif %}
{% endif %}
{% if i.vxlan %}
{% with op=op.remove_user_interface %}{% if op %}
<span
class=
"operation-wrapper"
>
<a
href=
"{{op.get_url}}?interface={{ i.pk }}"
class=
"btn btn-{{op.effect}} btn-xs operation interface-remove"
{%
if
op
.
disabled
%}
disabled
{%
endif
%}
>
{% trans "remove" %}
</a>
</span>
{% endif %}{% endwith %}
{% else %}
{% with op=op.remove_interface %}{% if op %}
{% with op=op.remove_interface %}{% if op %}
<span
class=
"operation-wrapper"
>
<span
class=
"operation-wrapper"
>
<a
href=
"{{op.get_url}}?interface={{ i.pk }}"
<a
href=
"{{op.get_url}}?interface={{ i.pk }}"
...
@@ -46,7 +31,6 @@
...
@@ -46,7 +31,6 @@
</a>
</a>
</span>
</span>
{% endif %}{% endwith %}
{% endif %}{% endwith %}
{% endif %}
</h3>
</h3>
{% if i.host %}
{% if i.host %}
<div
class=
"row"
>
<div
class=
"row"
>
...
...
circle/dashboard/views/util.py
View file @
63501e0a
...
@@ -387,6 +387,7 @@ class FormOperationMixin(object):
...
@@ -387,6 +387,7 @@ class FormOperationMixin(object):
def
post
(
self
,
request
,
extra
=
None
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
extra
=
None
,
*
args
,
**
kwargs
):
if
extra
is
None
:
if
extra
is
None
:
extra
=
{}
extra
=
{}
self
.
object
=
self
.
get_object
()
form
=
self
.
form_class
(
self
.
request
.
POST
,
**
self
.
get_form_kwargs
())
form
=
self
.
form_class
(
self
.
request
.
POST
,
**
self
.
get_form_kwargs
())
if
form
.
is_valid
():
if
form
.
is_valid
():
extra
.
update
(
form
.
cleaned_data
)
extra
.
update
(
form
.
cleaned_data
)
...
...
circle/dashboard/views/vm.py
View file @
63501e0a
...
@@ -142,6 +142,23 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
...
@@ -142,6 +142,23 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
activities
=
openstack_api
.
nova
.
instance_action_list
(
self
.
request
,
instance
.
id
)
activities
=
openstack_api
.
nova
.
instance_action_list
(
self
.
request
,
instance
.
id
)
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
]
all_networks
=
openstack_api
.
neutron
.
network_list
(
self
.
request
)
instance_networks
=
[
n
for
n
in
all_networks
if
n
.
id
in
instance_net_ids
and
len
(
n
.
subnets
)
>
0
]
router_ports
=
[
p
for
p
in
ports
if
p
.
device_owner
==
'network:router_interface'
]
routers
=
openstack_api
.
neutron
.
router_list
(
self
.
request
)
router_by_id
=
{
r
.
id
:
r
for
r
in
routers
}
for
n
in
instance_networks
:
n
.
subnet
=
n
.
subnets
[
0
]
#TODO: mark network public if it is based on router ports and router
context
[
'networks'
]
=
instance_networks
# context['vlans'] = Vlan.get_objects_with_level(
# context['vlans'] = Vlan.get_objects_with_level(
# 'user', self.request.user
# 'user', self.request.user
# ).exclude( # exclude already added interfaces
# ).exclude( # exclude already added interfaces
...
...
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