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
583f2684
authored
Apr 20, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement interface detach
parent
d90e9949
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
138 additions
and
112 deletions
+138
-112
.idea/workspace.xml
+129
-69
circle/dashboard/forms.py
+3
-16
circle/dashboard/templates/dashboard/vm-detail/network.html
+1
-1
circle/dashboard/views/vm.py
+2
-13
circle/vm/operations.py
+3
-13
No files found.
.idea/workspace.xml
View file @
583f2684
...
...
@@ -2,6 +2,9 @@
<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/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"
/>
...
...
@@ -32,11 +35,73 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"operations.py"
pinned=
"false"
current-in-tab=
"true"
>
<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=
"51"
>
<caret
line=
"364"
column=
"27"
lean-forward=
"false"
selection-start-line=
"364"
selection-start-column=
"6"
selection-end-line=
"364"
selection-end-column=
"27"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<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=
"248"
>
<caret
line=
"27"
column=
"37"
lean-forward=
"false"
selection-start-line=
"27"
selection-start-column=
"37"
selection-end-line=
"27"
selection-end-column=
"37"
/>
<folding>
<marker
date=
"1524213794390"
expanded=
"false"
signature=
"3495:3513"
ph=
"..."
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"forms.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/forms.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"78"
>
<caret
line=
"864"
column=
"40"
lean-forward=
"true"
selection-start-line=
"864"
selection-start-column=
"40"
selection-end-line=
"864"
selection-end-column=
"40"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"operations.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/vm/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"316"
>
<caret
line=
"622"
column=
"67"
lean-forward=
"false"
selection-start-line=
"622"
selection-start-column=
"67"
selection-end-line=
"622"
selection-end-column=
"67"
/>
<state
relative-caret-position=
"159"
>
<caret
line=
"409"
column=
"36"
lean-forward=
"true"
selection-start-line=
"409"
selection-start-column=
"36"
selection-end-line=
"409"
selection-end-column=
"36"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"nova.py"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/openstack_api/nova.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"202"
>
<caret
line=
"1008"
column=
"4"
lean-forward=
"false"
selection-start-line=
"1008"
selection-start-column=
"4"
selection-end-line=
"1008"
selection-end-column=
"4"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"nova_policy.json"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"185"
>
<caret
line=
"51"
column=
"4"
lean-forward=
"true"
selection-start-line=
"51"
selection-start-column=
"4"
selection-end-line=
"51"
selection-end-column=
"30"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"urls.py"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/urls.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"288"
>
<caret
line=
"228"
column=
"19"
lean-forward=
"true"
selection-start-line=
"228"
selection-start-column=
"19"
selection-end-line=
"228"
selection-end-column=
"19"
/>
<folding
/>
</state>
</provider>
...
...
@@ -54,14 +119,8 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
DEFAULT_SUBNETPOOL_NAME_FOR_USER
</find>
<find>
get_id
</find>
<find>
add_port
</find>
<find>
VmPortAddView
</find>
<find>
VmPortAddForm
</find>
<find>
vm_opts
</find>
<find>
removeport
</find>
<find>
vm_op
</find>
<find>
remove
</find>
<find>
port
</find>
<find>
VmPublicIpAddForm
</find>
...
...
@@ -84,6 +143,12 @@
<find>
rebootopera
</find>
<find>
destroyopera
</find>
<find>
sleepoper
</find>
<find>
removeinterface
</find>
<find>
vm_op
</find>
<find>
interface
</find>
<find>
hidden
</find>
<find>
removeint
</find>
<find>
remove_in
</find>
</findStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
...
...
@@ -96,6 +161,7 @@
<dir>
$PROJECT_DIR$/circle/dashboard/templates/dashboard
</dir>
<dir>
$PROJECT_DIR$/circle/openstack_auth
</dir>
<dir>
$PROJECT_DIR$/circle
</dir>
<dir>
$PROJECT_DIR$
</dir>
</dirStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -151,10 +217,10 @@
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/_network-public-ip-add.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html"
/>
</list>
</option>
</component>
...
...
@@ -231,13 +297,6 @@
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"dashboard"
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=
"dashboard"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"templates"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
...
...
@@ -251,7 +310,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=
"
operation	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py indev	null	null vmdeta	null	null indexview	null	null operatio	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py vxlanc	null	null plain	null	null base.	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	FILE	file:///home/h3yduck/cloud/circle/circle/settings/local.py views.	FILE	file:///home/h3yduck/cloud/circle/openstack_auth/views.py login.html	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/auth/login.html LoginVi	null	null indexv	null	null index-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html index.	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html bas	FILE	file:///home/h3yduck/cloud/circle/openstack_api/base.py save	null	null plainc	null	null templatedet	null	null instancetemp	null	null instancetem	null	null url	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py vmcreate	null	null opera	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py templat	null	null 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 vmdetai	null	null 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 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
"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
network	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail/network.html nova.	FILE	file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json operation	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py base	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py indev	null	null vmdeta	null	null indexview	null	null operatio	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py vxlanc	null	null plain	null	null base.	FILE	file:///home/h3yduck/cloud/circle/circle/settings/base.py local	FILE	file:///home/h3yduck/cloud/circle/circle/settings/local.py views.	FILE	file:///home/h3yduck/cloud/circle/openstack_auth/views.py login.html	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/auth/login.html LoginVi	null	null indexv	null	null index-vm	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html index.	FILE	file:///home/h3yduck/cloud/circle/dashboard/views/index.py index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html bas	FILE	file:///home/h3yduck/cloud/circle/openstack_api/base.py save	null	null plainc	null	null templatedet	null	null instancetemp	null	null instancetem	null	null url	FILE	file:///home/h3yduck/cloud/circle/dashboard/urls.py vmcreate	null	null opera	FILE	file:///home/h3yduck/cloud/circle/vm/operations.py operations	FILE	file:///home/h3yduck/cloud/circle/common/operations.py templat	null	null 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 vmdetai	null	null 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 create	FILE	file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html vxl	null	null
"
/>
</component>
<component
name=
"RecentsManager"
>
<key
name=
"CopyFile.RECENT_KEYS"
>
...
...
@@ -403,7 +462,7 @@
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32492113"
sideWeight=
"0.50745475"
order=
"7"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Python Console"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.43023255"
sideWeight=
"0.43610224"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Run"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32769555"
sideWeight=
"0.49574015"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.
47568712"
sideWeight=
"0.5058573
"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.
7097792"
sideWeight=
"0.5067976
"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.20015106"
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"
/>
...
...
@@ -411,7 +470,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=
"true"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.7097792"
sideWeight=
"0.49
41427
"
order=
"3"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Debug"
active=
"true"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.7097792"
sideWeight=
"0.49
320242
"
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"
/>
...
...
@@ -617,13 +676,6 @@ certifi.where()</expression-string>
</expressions>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/auth/login.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"459"
>
<caret
line=
"33"
column=
"15"
lean-forward=
"true"
selection-start-line=
"33"
selection-start-column=
"15"
selection-end-line=
"33"
selection-end-column=
"15"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/templates/registration/login.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"391"
>
...
...
@@ -840,14 +892,6 @@ certifi.where()</expression-string>
</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=
"156"
>
<caret
line=
"528"
column=
"0"
lean-forward=
"false"
selection-start-line=
"528"
selection-start-column=
"0"
selection-end-line=
"528"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"250"
>
...
...
@@ -937,84 +981,100 @@ certifi.where()</expression-string>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
urls
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
views/util
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
614
"
>
<caret
line=
"2
28"
column=
"22"
lean-forward=
"false"
selection-start-line=
"228"
selection-start-column=
"22"
selection-end-line=
"228"
selection-end-column=
"2
2"
/>
<state
relative-caret-position=
"
148
"
>
<caret
line=
"2
96"
column=
"19"
lean-forward=
"false"
selection-start-line=
"296"
selection-start-column=
"19"
selection-end-line=
"296"
selection-end-column=
"3
2"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/vm-detail/network.html
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
common/operations.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"357"
>
<caret
line=
"63"
column=
"24"
lean-forward=
"false"
selection-start-line=
"63"
selection-start-column=
"20"
selection-end-line=
"63"
selection-end-column=
"24"
/>
<folding>
<marker
date=
"1524052679121"
expanded=
"false"
signature=
"3492:3510"
ph=
"..."
/>
</folding>
<state
relative-caret-position=
"148"
>
<caret
line=
"69"
column=
"0"
lean-forward=
"false"
selection-start-line=
"69"
selection-start-column=
"0"
selection-end-line=
"69"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/util
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/settings/base
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
148
"
>
<caret
line=
"
296"
column=
"19"
lean-forward=
"false"
selection-start-line=
"296"
selection-start-column=
"19"
selection-end-line=
"296"
selection-end-column=
"32
"
/>
<state
relative-caret-position=
"
482
"
>
<caret
line=
"
592"
column=
"17"
lean-forward=
"false"
selection-start-line=
"592"
selection-start-column=
"17"
selection-end-line=
"592"
selection-end-column=
"17
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
common/operations
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/index
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
148
"
>
<caret
line=
"6
9"
column=
"0"
lean-forward=
"false"
selection-start-line=
"69"
selection-start-column=
"0"
selection-end-line=
"69"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
52
"
>
<caret
line=
"6
7"
column=
"13"
lean-forward=
"true"
selection-start-line=
"67"
selection-start-column=
"13"
selection-end-line=
"67"
selection-end-column=
"13
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://
$PROJECT_DIR$/circle/dashboard/forms
.py"
>
<entry
file=
"file://
/usr/lib/python2.7/SocketServer
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
259
"
>
<caret
line=
"1
040"
column=
"31"
lean-forward=
"false"
selection-start-line=
"1040"
selection-start-column=
"31"
selection-end-line=
"1040"
selection-end-column=
"31
"
/>
<state
relative-caret-position=
"
306
"
>
<caret
line=
"1
49"
column=
"0"
lean-forward=
"false"
selection-start-line=
"149"
selection-start-column=
"0"
selection-end-line=
"149"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
views/vm
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
urls
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
14
8"
>
<caret
line=
"
586"
column=
"0"
lean-forward=
"false"
selection-start-line=
"586"
selection-start-column=
"0"
selection-end-line=
"586"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
28
8"
>
<caret
line=
"
228"
column=
"19"
lean-forward=
"true"
selection-start-line=
"228"
selection-start-column=
"19"
selection-end-line=
"228"
selection-end-column=
"19
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/
settings/base.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/
os_policies/nova_policy.json
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
482
"
>
<caret
line=
"5
92"
column=
"17"
lean-forward=
"false"
selection-start-line=
"592"
selection-start-column=
"17"
selection-end-line=
"592"
selection-end-column=
"17
"
/>
<state
relative-caret-position=
"
185
"
>
<caret
line=
"5
1"
column=
"4"
lean-forward=
"true"
selection-start-line=
"51"
selection-start-column=
"4"
selection-end-line=
"51"
selection-end-column=
"30
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/
index
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/
vm
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"5
2
"
>
<caret
line=
"
67"
column=
"13"
lean-forward=
"true"
selection-start-line=
"67"
selection-start-column=
"13"
selection-end-line=
"67"
selection-end-column=
"13
"
/>
<state
relative-caret-position=
"5
1
"
>
<caret
line=
"
364"
column=
"27"
lean-forward=
"false"
selection-start-line=
"364"
selection-start-column=
"6"
selection-end-line=
"364"
selection-end-column=
"27
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://
/usr/lib/python2.7/SocketServer
.py"
>
<entry
file=
"file://
$PROJECT_DIR$/circle/dashboard/forms
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
306
"
>
<caret
line=
"
149"
column=
"0"
lean-forward=
"false"
selection-start-line=
"149"
selection-start-column=
"0"
selection-end-line=
"149"
selection-end-column=
"
0"
/>
<state
relative-caret-position=
"
78
"
>
<caret
line=
"
864"
column=
"40"
lean-forward=
"true"
selection-start-line=
"864"
selection-start-column=
"40"
selection-end-line=
"864"
selection-end-column=
"4
0"
/>
<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=
"248"
>
<caret
line=
"27"
column=
"37"
lean-forward=
"false"
selection-start-line=
"27"
selection-start-column=
"37"
selection-end-line=
"27"
selection-end-column=
"37"
/>
<folding>
<marker
date=
"1524213794390"
expanded=
"false"
signature=
"3495:3513"
ph=
"..."
/>
</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=
"316"
>
<caret
line=
"622"
column=
"67"
lean-forward=
"false"
selection-start-line=
"622"
selection-start-column=
"67"
selection-end-line=
"622"
selection-end-column=
"67"
/>
<state
relative-caret-position=
"159"
>
<caret
line=
"409"
column=
"36"
lean-forward=
"true"
selection-start-line=
"409"
selection-start-column=
"36"
selection-end-line=
"409"
selection-end-column=
"36"
/>
<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=
"202"
>
<caret
line=
"1008"
column=
"4"
lean-forward=
"false"
selection-start-line=
"1008"
selection-start-column=
"4"
selection-end-line=
"1008"
selection-end-column=
"4"
/>
<folding
/>
</state>
</provider>
...
...
circle/dashboard/forms.py
View file @
583f2684
...
...
@@ -863,30 +863,17 @@ class VmDownloadDiskForm(OperationForm):
class
VmRemoveInterfaceForm
(
OperationForm
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
choices
=
kwargs
.
pop
(
'choices'
)
self
.
interface
=
kwargs
.
pop
(
'default'
)
port_id
=
kwargs
.
pop
(
'port_id'
)
super
(
VmRemoveInterfaceForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
self
.
fields
[
'interface'
]
=
forms
.
ModelChoiceField
(
queryset
=
choices
,
initial
=
self
.
interface
,
required
=
True
,
empty_label
=
None
,
label
=
_
(
'Interface'
))
if
self
.
interface
:
self
.
fields
[
'interface'
]
.
widget
=
HiddenInput
()
self
.
fields
[
'port_id'
]
=
forms
.
CharField
(
widget
=
forms
.
HiddenInput
(),
initial
=
port_id
)
@property
def
helper
(
self
):
helper
=
super
(
VmRemoveInterfaceForm
,
self
)
.
helper
if
self
.
interface
:
helper
.
layout
=
Layout
(
AnyTag
(
"div"
,
HTML
(
format_html
(
_
(
"<label>Vlan:</label> {0}"
),
self
.
interface
.
vlan
)),
css_class
=
"form-group"
,
),
Field
(
"interface"
),
Field
(
"port_id"
),
)
return
helper
...
...
circle/dashboard/templates/dashboard/vm-detail/network.html
View file @
583f2684
...
...
@@ -25,7 +25,7 @@
{% with op=op.remove_interface %}{% if op %}
<span
class=
"operation-wrapper"
>
<a
href=
"{{op.get_url}}?
interface={{ i.pk
}}"
<a
href=
"{{op.get_url}}?
port_id={{ i.port_id
}}"
class=
"btn btn-{{op.effect}} btn-xs operation interface-remove"
{%
if
op
.
disabled
%}
disabled
{%
endif
%}
>
{% trans "remove" %}
</a>
...
...
circle/dashboard/views/vm.py
View file @
583f2684
...
...
@@ -366,25 +366,14 @@ 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
port_id
=
self
.
request
.
GET
.
get
(
'port_id'
)
val
=
super
(
VmRemoveInterfaceView
,
self
)
.
get_form_kwargs
()
val
.
update
({
'
choices'
:
choices
,
'default'
:
default
})
val
.
update
({
'
port_id'
:
port_id
})
return
val
...
...
circle/vm/operations.py
View file @
583f2684
...
...
@@ -403,21 +403,11 @@ class RemoveInterfaceOperation(InstanceOperation):
description
=
_
(
"Remove the specified network interface and erase IP "
"address allocations, related firewall rules and "
"hostnames."
)
required_perms
=
()
accept_states
=
(
'STOPPED'
,
'PENDING'
,
'ACTIVE'
)
os_policy_actions
=
((
"compute"
,
"compute:detach_interface"
),)
def
_operation
(
self
,
activity
,
user
,
system
,
interface
):
if
self
.
instance
.
is_running
:
self
.
instance
.
_detach_network
(
interface
=
interface
,
parent_activity
=
activity
)
interface
.
shutdown
()
interface
.
destroy
()
interface
.
delete
()
def
get_activity_name
(
self
,
kwargs
):
return
create_readable
(
ugettext_noop
(
"remove
%(vlan)
s interface"
),
vlan
=
kwargs
[
'interface'
]
.
vlan
)
def
_operation
(
self
,
request
,
port_id
):
openstack_api
.
nova
.
interface_detach
(
request
,
self
.
instance
.
id
,
port_id
)
@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