Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
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
ef0ed6be
authored
Mar 08, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable 'Add network interface' operation
parent
cb15e6e4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
178 additions
and
206 deletions
+178
-206
.idea/workspace.xml
+126
-111
circle/dashboard/templates/dashboard/vm-detail/network.html
+0
-9
circle/dashboard/views/vm.py
+48
-48
circle/vm/operations.py
+4
-38
No files found.
.idea/workspace.xml
View file @
ef0ed6be
...
...
@@ -2,8 +2,10 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
afterPath=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/network/views.py"
afterPath=
"$PROJECT_DIR$/circle/network/views.py"
/>
<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/vm.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/vm.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"
/>
...
...
@@ -29,43 +31,34 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
views.py"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/views.py
"
>
<file
leaf-file-name=
"
network.html"
pinned=
"false"
current-in-tab=
"fals
e"
>
<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=
"153"
>
<caret
line=
"999"
column=
"12"
lean-forward=
"true"
selection-start-line=
"999"
selection-start-column=
"12"
selection-end-line=
"999"
selection-end-column=
"12"
/>
<folding>
<element
signature=
"e#732#743#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"base.py"
pinned=
"false"
current-in-tab=
"false"
>
<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"
/>
<state
relative-caret-position=
"119"
>
<caret
line=
"7"
column=
"20"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"20"
selection-end-line=
"7"
selection-end-column=
"20"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
models
.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/models
.py"
>
<file
leaf-file-name=
"
vm
.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/vm
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"692"
>
<caret
line=
"96"
column=
"72"
lean-forward=
"false"
selection-start-line=
"96"
selection-start-column=
"72"
selection-end-line=
"96"
selection-end-column=
"72"
/>
<folding
/>
<state
relative-caret-position=
"207"
>
<caret
line=
"341"
column=
"31"
lean-forward=
"false"
selection-start-line=
"341"
selection-start-column=
"31"
selection-end-line=
"341"
selection-end-column=
"31"
/>
<folding>
<element
signature=
"e#731#787#0"
expanded=
"true"
/>
<element
signature=
"e#40423#41594#0"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
vxlan-create.html"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/templates/network/vxlan-create.html
"
>
<file
leaf-file-name=
"
operations.py"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
vm/operations.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
5
7"
>
<caret
line=
"
25"
column=
"53"
lean-forward=
"false"
selection-start-line=
"25"
selection-start-column=
"53"
selection-end-line=
"25"
selection-end-column=
"53
"
/>
<state
relative-caret-position=
"2
0
7"
>
<caret
line=
"
184"
column=
"39"
lean-forward=
"false"
selection-start-line=
"184"
selection-start-column=
"39"
selection-end-line=
"184"
selection-end-column=
"39
"
/>
<folding
/>
</state>
</provider>
...
...
@@ -83,17 +76,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
VxlanForm
</find>
<find>
vxlancrea
</find>
<find>
forms
</find>
<find>
vnc
</find>
<find>
c
</find>
<find>
span
</find>
<find>
network
</find>
<find>
static
</find>
<find>
{% javascript
</find>
<find>
datastore
</find>
<find>
horizon/client_side/
</find>
<find>
jstemplate
</find>
<find>
tag
</find>
<find>
editor.
</find>
...
...
@@ -113,6 +95,17 @@
<find>
create
</find>
<find>
server_cr
</find>
<find>
server_create
</find>
<find>
vmaddin
</find>
<find>
vmaddinter
</find>
<find>
VmAddInterfaceForm
</find>
<find>
addinterfac
</find>
<find>
states
</find>
<find>
status
</find>
<find>
addinterface
</find>
<find>
addinterf
</find>
<find>
polic
</find>
<find>
addinterfa
</find>
<find>
interface
</find>
</findStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
...
...
@@ -127,8 +120,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/circle/dashboard/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/urls.py"
/>
<option
value=
"$PROJECT_DIR$/circle/common/views.py"
/>
...
...
@@ -173,11 +164,13 @@
<option
value=
"$PROJECT_DIR$/circle/dashboard/static/vue.css"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.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/dashboard/templates/dashboard/vm-detail/network.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
</list>
</option>
</component>
...
...
@@ -247,6 +240,19 @@
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
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=
"circle"
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=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"os_policies"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
...
...
@@ -261,7 +267,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=
"
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 vmdeta	null	null index	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 instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py
_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 Instance	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 index.py	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index.htm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html server	null	null Disk	null	null"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
instance	null	null 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 index	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 Instance	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 index.py	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index.htm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html server	null	null Disk	null	null"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
...
@@ -371,10 +377,11 @@
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.18051118"
sideWeight=
"0.5"
order=
"0"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Docker"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"false"
weight=
"0.33"
sideWeight=
"0.5"
order=
"8"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Database"
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=
"Find"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32980973"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<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=
"
tru
e"
show_stripe_button=
"true"
weight=
"0.35200846"
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=
"
fals
e"
show_stripe_button=
"true"
weight=
"0.35200846"
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"
/>
...
...
@@ -382,7 +389,6 @@
<window_info
id=
"Inspection"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"5"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Coverage"
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=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Hierarchy"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.25"
sideWeight=
"0.5"
order=
"2"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Find"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32980973"
sideWeight=
"0.5"
order=
"1"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Ant Build"
active=
"false"
anchor=
"right"
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"
/>
</layout>
<layout-to-restore>
...
...
@@ -539,48 +545,6 @@
</expressions>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/circle/bower_components/hogan.js/web/builds/3.0.2/hogan-3.0.2.js"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-306"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_alert_message.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"20"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"20"
selection-end-line=
"0"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_confirm.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"20"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"20"
selection-end-line=
"0"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_loading_inline.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"20"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"20"
selection-end-line=
"0"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_progress.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"20"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"20"
selection-end-line=
"0"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_table_row.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"20"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"20"
selection-end-line=
"0"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/template.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
...
...
@@ -739,6 +703,7 @@
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"170"
>
<caret
line=
"84"
column=
"13"
lean-forward=
"false"
selection-start-line=
"84"
selection-start-column=
"13"
selection-end-line=
"84"
selection-end-column=
"65"
/>
<folding
/>
</state>
</provider>
</entry>
...
...
@@ -838,16 +803,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=
"518"
>
<caret
line=
"1031"
column=
"39"
lean-forward=
"true"
selection-start-line=
"1031"
selection-start-column=
"39"
selection-end-line=
"1031"
selection-end-column=
"39"
/>
<folding>
<element
signature=
"e#40463#41634#0"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"831"
>
...
...
@@ -882,14 +837,32 @@
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/network/models
.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=
"
692
"
>
<caret
line=
"
96"
column=
"72"
lean-forward=
"false"
selection-start-line=
"96"
selection-start-column=
"72"
selection-end-line=
"96"
selection-end-column=
"72
"
/>
<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/openstack_api/neutron.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"663"
>
<caret
line=
"1121"
column=
"43"
lean-forward=
"false"
selection-start-line=
"1121"
selection-start-column=
"43"
selection-end-line=
"1121"
selection-end-column=
"43"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/views.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"442"
>
<caret
line=
"1016"
column=
"45"
lean-forward=
"false"
selection-start-line=
"1016"
selection-start-column=
"45"
selection-end-line=
"1016"
selection-end-column=
"45"
/>
<folding>
<element
signature=
"e#732#743#0"
expanded=
"false"
/>
</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"
>
...
...
@@ -898,39 +871,80 @@
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/network/models.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"692"
>
<caret
line=
"96"
column=
"72"
lean-forward=
"false"
selection-start-line=
"96"
selection-start-column=
"72"
selection-end-line=
"96"
selection-end-column=
"72"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"335"
>
<caret
line=
"25"
column=
"53"
lean-forward=
"false"
selection-start-line=
"25"
selection-start-column=
"53"
selection-end-line=
"25"
selection-end-column=
"53"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/forms.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
"
/>
<caret
line=
"
990"
column=
"6"
lean-forward=
"false"
selection-start-line=
"990"
selection-start-column=
"6"
selection-end-line=
"990"
selection-end-column=
"24
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/neutron.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/neutron_policy.json
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
663
"
>
<caret
line=
"11
21"
column=
"43"
lean-forward=
"false"
selection-start-line=
"1121"
selection-start-column=
"43"
selection-end-line=
"1121"
selection-end-column=
"43
"
/>
<state
relative-caret-position=
"
178
"
>
<caret
line=
"11
7"
column=
"28"
lean-forward=
"false"
selection-start-line=
"117"
selection-start-column=
"19"
selection-end-line=
"117"
selection-end-column=
"28
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/templates/network/vxlan-create.html
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/nova_policy.json
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
257
"
>
<caret
line=
"
25"
column=
"53"
lean-forward=
"false"
selection-start-line=
"25"
selection-start-column=
"53"
selection-end-line=
"25"
selection-end-column=
"53
"
/>
<state
relative-caret-position=
"
178
"
>
<caret
line=
"
50"
column=
"29"
lean-forward=
"false"
selection-start-line=
"50"
selection-start-column=
"20"
selection-end-line=
"50"
selection-end-column=
"29
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/views.py
"
>
<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=
"153"
>
<caret
line=
"999"
column=
"12"
lean-forward=
"true"
selection-start-line=
"999"
selection-start-column=
"12"
selection-end-line=
"999"
selection-end-column=
"12"
/>
<state
relative-caret-position=
"119"
>
<caret
line=
"7"
column=
"20"
lean-forward=
"false"
selection-start-line=
"7"
selection-start-column=
"20"
selection-end-line=
"7"
selection-end-column=
"20"
/>
<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=
"207"
>
<caret
line=
"341"
column=
"31"
lean-forward=
"false"
selection-start-line=
"341"
selection-start-column=
"31"
selection-end-line=
"341"
selection-end-column=
"31"
/>
<folding>
<element
signature=
"e#732#743#0"
expanded=
"true"
/>
<element
signature=
"e#731#787#0"
expanded=
"true"
/>
<element
signature=
"e#40423#41594#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=
"224"
>
<caret
line=
"213"
column=
"8"
lean-forward=
"false"
selection-start-line=
"213"
selection-start-column=
"8"
selection-end-line=
"221"
selection-end-column=
"36"
/>
<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=
"207"
>
<caret
line=
"184"
column=
"39"
lean-forward=
"false"
selection-start-line=
"184"
selection-start-column=
"39"
selection-end-line=
"184"
selection-end-column=
"39"
/>
<folding
/>
</state>
</provider>
</entry>
</component>
</project>
\ No newline at end of file
circle/dashboard/templates/dashboard/vm-detail/network.html
View file @
ef0ed6be
...
...
@@ -8,15 +8,6 @@
<i
class=
"fa fa-{{op.icon}}"
></i>
{% trans "add interface" %}
</a>
{% endif %}{% endwith %}
</div>
<br
/>
<br
/>
<div
id=
"vm-details-add-user-interface"
>
{% with op=op.add_user_interface %}{% if op %}
<a
href=
"{{op.get_url}}"
class=
"btn btn-{{op.effect}} operation pull-right"
{%
if
op
.
disabled
%}
disabled
{%
endif
%}
>
<i
class=
"fa fa-{{op.icon}}"
></i>
{% trans "add user interface" %}
</a>
{% endif %}{% endwith %}
</div>
<h2>
{% trans "Interfaces" %}
</h2>
...
...
circle/dashboard/views/vm.py
View file @
ef0ed6be
...
...
@@ -60,7 +60,8 @@ from .util import (
FormOperationMixin
,
FilterMixin
,
GraphMixin
)
from
..forms
import
(
AclUserOrGroupAddForm
,
VmResourcesForm
,
VmCustomizeForm
,
VmDeployForm
,
VmFromPlainImageForm
)
AclUserOrGroupAddForm
,
VmResourcesForm
,
VmCustomizeForm
,
VmDeployForm
,
VmFromPlainImageForm
,
VmRemoveInterfaceForm
,
VmAddInterfaceForm
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -308,52 +309,51 @@ def get_operations(instance, user, request):
else
:
ops
.
append
(
v
.
bind_to_object
(
instance
))
return
ops
#
#
# class VmRemoveInterfaceView(FormOperationMixin, VmOperationView):
# op = 'remove_interface'
# form_class = VmRemoveInterfaceForm
# show_in_toolbar = False
# wait_for_result = 0.5
# icon = 'times'
# effect = "danger"
# with_reload = True
#
# def get_form_kwargs(self):
# instance = self.get_op().instance
# choices = instance.interface_set.all()
# interface_pk = self.request.GET.get('interface')
# if interface_pk:
# try:
# default = choices.get(pk=interface_pk)
# except (ValueError, Interface.DoesNotExist):
# raise Http404()
# else:
# default = None
#
# val = super(VmRemoveInterfaceView, self).get_form_kwargs()
# val.update({'choices': choices, 'default': default})
# return val
#
#
# class VmAddInterfaceView(FormOperationMixin, VmOperationView):
#
# op = 'add_interface'
# form_class = VmAddInterfaceForm
# show_in_toolbar = False
# icon = 'globe'
# effect = 'success'
# with_reload = True
#
# def get_form_kwargs(self):
# inst = self.get_op().instance
# choices = Vlan.get_objects_with_level(
# "user", self.request.user).exclude(
# vm_interface__instance__in=[inst])
# val = super(VmAddInterfaceView, self).get_form_kwargs()
# val.update({'choices': choices})
# return val
#
class
VmRemoveInterfaceView
(
FormOperationMixin
,
VmOperationView
):
op
=
'remove_interface'
form_class
=
VmRemoveInterfaceForm
show_in_toolbar
=
False
wait_for_result
=
0.5
icon
=
'times'
effect
=
"danger"
with_reload
=
True
def
get_form_kwargs
(
self
):
instance
=
self
.
get_op
()
.
instance
choices
=
instance
.
interface_set
.
all
()
interface_pk
=
self
.
request
.
GET
.
get
(
'interface'
)
if
interface_pk
:
try
:
default
=
choices
.
get
(
pk
=
interface_pk
)
except
(
ValueError
,
Interface
.
DoesNotExist
):
raise
Http404
()
else
:
default
=
None
val
=
super
(
VmRemoveInterfaceView
,
self
)
.
get_form_kwargs
()
val
.
update
({
'choices'
:
choices
,
'default'
:
default
})
return
val
class
VmAddInterfaceView
(
FormOperationMixin
,
VmOperationView
):
op
=
'add_interface'
form_class
=
VmAddInterfaceForm
show_in_toolbar
=
False
icon
=
'globe'
effect
=
'success'
with_reload
=
True
def
get_form_kwargs
(
self
):
inst
=
self
.
get_op
()
.
instance
choices
=
Vlan
.
get_objects_with_level
(
"user"
,
self
.
request
.
user
)
.
exclude
(
vm_interface__instance__in
=
[
inst
])
val
=
super
(
VmAddInterfaceView
,
self
)
.
get_form_kwargs
()
val
.
update
({
'choices'
:
choices
})
return
val
#
# class VmDiskModifyView(FormOperationMixin, VmOperationView):
# show_in_toolbar = False
...
...
@@ -761,8 +761,8 @@ vm_ops = OrderedDict([
# ('remove_disk', VmDiskModifyView.factory(
# op='remove_disk', form_class=VmDiskRemoveForm,
# icon='times', effect="danger")),
#
('add_interface', VmAddInterfaceView),
#
('remove_interface', VmRemoveInterfaceView),
(
'add_interface'
,
VmAddInterfaceView
),
(
'remove_interface'
,
VmRemoveInterfaceView
),
# ('remove_port', VmPortRemoveView),
# ('add_port', VmPortAddView),
# ('renew', VmRenewView),
...
...
circle/vm/operations.py
View file @
ef0ed6be
...
...
@@ -185,46 +185,12 @@ class RemoteAgentOperation(EnsureAgentMixin, RemoteInstanceOperation):
class
AddInterfaceOperation
(
InstanceOperation
):
id
=
'add_interface'
name
=
_
(
"add interface"
)
description
=
_
(
"Add a new network interface for the specified VLAN to "
"the VM."
)
required_perms
=
()
accept_states
=
(
'STOPPED'
,
'PENDING'
,
'ACTIVE'
)
accept_states
=
(
'STOPPED'
,
'PENDING'
,
'RUNNING'
)
network_type
=
None
def
rollback
(
self
,
net
,
activity
):
with
activity
.
sub_activity
(
'destroying_net'
,
readable_name
=
ugettext_noop
(
"destroy network (rollback)"
)):
net
.
destroy
()
net
.
delete
()
description
=
_
(
"Add a new network interface for the specified network to the VM."
)
accept_states
=
(
'SHUTOFF'
,
'ACTIVE'
)
#TODO: try other states
os_policy_actions
=
((
"compute"
,
"compute:attach_interface"
),)
def
_operation
(
self
,
activity
,
user
,
system
,
vlan
,
managed
=
None
):
if
not
vlan
.
has_level
(
user
,
'user'
):
raise
humanize_exception
(
ugettext_noop
(
"User acces to vlan
%(vlan)
s is required."
),
PermissionDenied
(),
vlan
=
vlan
)
if
managed
is
None
:
managed
=
vlan
.
managed
net
=
Interface
.
create
(
base_activity
=
activity
,
instance
=
self
.
instance
,
managed
=
managed
,
owner
=
user
,
vlan
=
vlan
)
if
self
.
instance
.
is_running
:
try
:
self
.
instance
.
_attach_network
(
interface
=
net
,
parent_activity
=
activity
)
except
Exception
as
e
:
if
hasattr
(
e
,
'libvirtError'
):
self
.
rollback
(
net
,
activity
)
raise
net
.
deploy
()
self
.
instance
.
_change_ip
(
parent_activity
=
activity
)
self
.
instance
.
_restart_networking
(
parent_activity
=
activity
)
def
get_activity_name
(
self
,
kwargs
):
return
create_readable
(
ugettext_noop
(
"add
%(vlan)
s interface"
),
vlan
=
kwargs
[
'vlan'
])
print
(
"Adding interface"
)
@register_operation
...
...
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