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
327e7892
authored
Mar 02, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement start vm
parent
55430047
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
557 additions
and
489 deletions
+557
-489
.idea/codeStyles/codeStyleConfig.xml
+6
-0
.idea/workspace.xml
+259
-289
circle/circle/db.sqlite3
+0
-0
circle/dashboard/forms.py
+42
-0
circle/dashboard/templates/dashboard/_vm-create-1.html
+21
-9
circle/dashboard/templates/dashboard/vm-plain-image-create.html
+19
-0
circle/dashboard/urls.py
+6
-6
circle/dashboard/views/index.py
+3
-0
circle/dashboard/views/util.py
+4
-0
circle/dashboard/views/vm.py
+42
-40
circle/network/forms.py
+1
-9
circle/network/models.py
+2
-42
circle/openstack_api/__init__.py
+2
-2
circle/openstack_api/neutron.py
+81
-83
circle/openstack_api/nova.py
+4
-4
circle/openstack_api/policy.py
+56
-0
circle/request/urls.py
+4
-4
circle/vm/models/instance.py
+5
-1
No files found.
.idea/codeStyles/codeStyleConfig.xml
0 → 100644
View file @
327e7892
<component
name=
"ProjectCodeStyleConfiguration"
>
<state>
<option
name=
"PREFERRED_PROJECT_CODE_STYLE"
value=
"Default"
/>
</state>
</component>
\ No newline at end of file
.idea/workspace.xml
View file @
327e7892
...
...
@@ -2,13 +2,23 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"1fbec8af-5a7c-40f9-b994-83ac07d1ae1d"
name=
"Default"
comment=
""
>
<change
beforePath=
""
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html"
/>
<change
beforePath=
""
afterPath=
"$PROJECT_DIR$/circle/openstack_api/policy.py"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/circle/db.sqlite3"
afterPath=
"$PROJECT_DIR$/circle/circle/db.sqlite3"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/common/views.py"
afterPath=
"$PROJECT_DIR$/circle/common/views.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/templates/auth/login.html"
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/auth/login.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/forms.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-create-1.html"
afterPath=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-create-1.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/urls.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/urls.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
afterPath=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<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/network/forms.py"
afterPath=
"$PROJECT_DIR$/circle/network/forms.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/network/models.py"
afterPath=
"$PROJECT_DIR$/circle/network/models.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/network/templates/network/editor.html"
afterPath=
"$PROJECT_DIR$/circle/network/templates/network/editor.html"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/network/views.py"
afterPath=
"$PROJECT_DIR$/circle/network/views.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/openstack_api/__init__.py"
afterPath=
"$PROJECT_DIR$/circle/openstack_api/__init__.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/openstack_api/neutron.py"
afterPath=
"$PROJECT_DIR$/circle/openstack_api/neutron.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
afterPath=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/request/urls.py"
afterPath=
"$PROJECT_DIR$/circle/request/urls.py"
/>
<change
beforePath=
"$PROJECT_DIR$/circle/vm/models/instance.py"
afterPath=
"$PROJECT_DIR$/circle/vm/models/instance.py"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -34,50 +44,16 @@
</component>
<component
name=
"FileEditorManager"
>
<leaf
SIDE_TABS_SIZE_LIMIT_KEY=
"300"
>
<file
leaf-file-name=
"
user.py"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/user
.py"
>
<file
leaf-file-name=
"
__init__.py"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/__init__
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
306
"
>
<caret
line=
"
107"
column=
"29"
lean-forward=
"false"
selection-start-line=
"107"
selection-start-column=
"29"
selection-end-line=
"107"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"
284
"
>
<caret
line=
"
38"
column=
"0"
lean-forward=
"false"
selection-start-line=
"38"
selection-start-column=
"0"
selection-end-line=
"38"
selection-end-column=
"0
"
/>
<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=
"323"
>
<caret
line=
"1076"
column=
"28"
lean-forward=
"true"
selection-start-line=
"1076"
selection-start-column=
"28"
selection-end-line=
"1076"
selection-end-column=
"28"
/>
<folding>
<element
signature=
"e#732#770#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"login.html"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/circle/templates/registration/login.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"28"
lean-forward=
"true"
selection-start-line=
"0"
selection-start-column=
"28"
selection-end-line=
"0"
selection-end-column=
"28"
/>
<folding
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"login.html"
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/templates/auth/login.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"714"
>
<caret
line=
"42"
column=
"0"
lean-forward=
"false"
selection-start-line=
"42"
selection-start-column=
"0"
selection-end-line=
"42"
selection-end-column=
"0"
/>
<folding>
<element
signature=
"n#style#0;n#h4#0;n#div#2;n#div#0;n#!!top"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component
name=
"FileTemplateManagerImpl"
>
...
...
@@ -90,39 +66,40 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
InstanceOperation(
</find>
<find>
openstack_aut
</find>
<find>
policy
</find>
<find>
get_operat
</find>
<find>
get_operations
</find>
<find>
vm_ops =
</find>
<find>
wakeupOper
</find>
<find>
Deployopera
</find>
<find>
((
"
compute
"
,
"
compute:start
"
),)wa
</find>
<find>
wakeup
</find>
<find>
sleepoper
</find>
<find>
rebootoper
</find>
<find>
"
compute:resume
"
</find>
<find>
reboot
</find>
<find>
shutoff
</find>
<find>
destroyope
</find>
<find>
ACL_LEVELS
</find>
<find>
a
</find>
<find>
get_env_variable
</find>
<find>
editor
</find>
<find>
network
</find>
<find>
acl
</find>
<find>
check
</find>
<find>
checked
</find>
<find>
admin_and_matching_domain_id
</find>
<find>
network-editor
</find>
<find>
editor.es
</find>
<find>
editor.es6
</find>
<find>
{% cris
</find>
<find>
FormHelper
</find>
<find>
vxlan
</find>
<find>
disk
</find>
<find>
disk(
</find>
<find>
instance(
</find>
<find>
template
</find>
<find>
class
</find>
<find>
vmcreate
</find>
<find>
priority_choices
</find>
<find>
plain
</find>
<find>
asd
</find>
<find>
vmcreat
</find>
<find>
customize
</find>
<find>
custom
</find>
<find>
customized
</find>
<find>
policy
</find>
<find>
profile
</find>
<find>
@profiler.trace
</find>
<find>
vmdetail
</find>
<find>
create(
</find>
<find>
pk
</find>
<find>
get_ab
</find>
<find>
vmdeta
</find>
<find>
instanc
</find>
<find>
[a-z0-9-]+
</find>
</findStrings>
<replaceStrings>
<replace>
'ACTIVE'
</replace>
<replace>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
</replace>
</replaceStrings>
</component>
<component
name=
"Git.Settings"
>
...
...
@@ -131,57 +108,57 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/user_key.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/tables.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/local.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/plugin/password.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/user.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/login.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/context_processors.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/user.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/base.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/exceptions.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/__init__.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py"
/>
<option
value=
"$PROJECT_DIR$/circle/storage/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/base.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/managers/os_instance_manager.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/access.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/__init__.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/glance.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html"
/>
<option
value=
"$PROJECT_DIR$/circle/acl/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/urls.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/neutron_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/cinder_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/glance_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/keystone_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_auth/__init__.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
/>
<option
value=
"$PROJECT_DIR$/circle/common/operations.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/models/common.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/models/instance.py"
/>
<option
value=
"$PROJECT_DIR$/circle/firewall/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/base.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/network/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/common/views.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/views.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/templates/network/editor.html"
/>
<option
value=
"$PROJECT_DIR$/circle/circle/settings/static_and_pipeline.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/auth/login.html"
/>
<option
value=
"$PROJECT_DIR$/circle/network/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/network/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/index.py"
/>
<option
value=
"$PROJECT_DIR$/circle/storage/models.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-create-2.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-create-1.html"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/__init__.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/neutron.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/policy.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/forms.py"
/>
<option
value=
"$PROJECT_DIR$/circle/openstack_api/nova.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/vm.py"
/>
<option
value=
"$PROJECT_DIR$/circle/vm/models/instance.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/views/util.py"
/>
<option
value=
"$PROJECT_DIR$/circle/dashboard/urls.py"
/>
<option
value=
"$PROJECT_DIR$/circle/request/urls.py"
/>
</list>
</option>
</component>
...
...
@@ -194,8 +171,8 @@
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"-2"
/>
<option
name=
"y"
value=
"-1"
/>
<option
name=
"width"
value=
"1
924
"
/>
<option
name=
"height"
value=
"
1063
"
/>
<option
name=
"width"
value=
"1
370
"
/>
<option
name=
"height"
value=
"
751
"
/>
</component>
<component
name=
"ProjectInspectionProfilesVisibleTreeState"
>
<entry
key=
"Project Default"
>
...
...
@@ -234,7 +211,7 @@
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"Sc
ratches
"
/>
<pane
id=
"Sc
ope
"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
...
...
@@ -258,30 +235,28 @@
<item
name=
"cloud"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"circle"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"dashboard"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"
template
s"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"
view
s"
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"
/>
<item
name=
"auth"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"request"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
</pane>
<pane
id=
"Sc
ope
"
/>
<pane
id=
"Sc
ratches
"
/>
</panes>
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/circle"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"preferences.
keymap
"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"preferences.
sourceCode.HTML
"
/>
<property
name=
"NewWatcherDialog.advanced.open"
value=
"true"
/>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
<property
name=
"SearchEverywhereHistoryKey"
value=
"
loginV	null	null instance	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py
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	FILE	file:///home/h3yduck/cloud/circle/vm/models/instance.py index	FILE	file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.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"
>
...
...
@@ -351,28 +326,28 @@
</todo-panel>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"-2"
y=
"-1"
width=
"1
924"
height=
"1063
"
extended-state=
"0"
/>
<frame
x=
"-2"
y=
"-1"
width=
"1
370"
height=
"751
"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"TODO"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.32980973"
sideWeight=
"0.4978701"
order=
"6"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Event Log"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.327818"
sideWeight=
"0.5021299"
order=
"7"
side_tool=
"true"
content_ui=
"tabs"
/>
<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.32875264"
sideWeight=
"0.5"
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.32875264"
sideWeight=
"0.4978701"
order=
"2"
side_tool=
"false"
content_ui=
"tabs"
/>
<window_info
id=
"Version Control"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.3280757"
sideWeight=
"0.5"
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=
"Terminal"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.5264271"
sideWeight=
"0.44888178"
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.
20766774
"
sideWeight=
"0.5"
order=
"0"
side_tool=
"false"
content_ui=
"combo"
/>
<window_info
id=
"Project"
active=
"false"
anchor=
"left"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"true"
show_stripe_button=
"true"
weight=
"0.
18504532
"
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=
"Debug"
active=
"false"
anchor=
"bottom"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.35962147"
sideWeight=
"0.5511182"
order=
"3"
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=
"false"
show_stripe_button=
"true"
weight=
"0.5264271"
sideWeight=
"0.5511182"
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=
"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"
/>
<window_info
id=
"Commander"
active=
"false"
anchor=
"right"
auto_hide=
"false"
internal_type=
"DOCKED"
type=
"DOCKED"
visible=
"false"
show_stripe_button=
"true"
weight=
"0.4"
sideWeight=
"0.5"
order=
"0"
side_tool=
"false"
content_ui=
"tabs"
/>
<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=
"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>
...
...
@@ -449,7 +424,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option
name=
"time"
value=
"1
24
"
/>
<option
name=
"time"
value=
"1
55
"
/>
</breakpoint-manager>
<watches-manager
/>
</component>
...
...
@@ -482,201 +457,203 @@
</expressions>
<expressions
id=
"evaluateExpression"
>
<expression>
<expression-string>
import_string(
"
openstack_auth.policy.check
"
)
</expression-string>
<expression-string>
self.get_object().pk
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
policy = import_string(
"
openstack_auth.policy.check
"
)
</expression-string>
<expression-string>
self.get_object(
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
policy = import_string(
"
POLICY_CHECK_FUNCTION
"
)
</expression-string>
<expression-string>
request.POST.get(
"
network
"
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
instance._os_server.tenant_id
</expression-string>
<expression-string>
request.POST.get(
"
name
"
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
instance._os_server._attrs
</expression-string>
<expression-string>
request.POST
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
openstack_api.glance.
</expression-string>
<expression-string>
request.POST.get(
"
from_plain_image
"
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
openstack_api.
glance.get_image_upload_mode(
)
</expression-string>
<expression-string>
openstack_api.
nova.flavor_list(request
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
openstack_api.glance.tenant_quota_get(request, '31911a90329944c18c285398ec72e4f6'
)
</expression-string>
<expression-string>
templates.all().all(
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
<expression>
<expression-string>
openstack_api.cinder.tenant_quota_get(request, '31911a90329944c18c285398ec72e4f6'
)
</expression-string>
<expression-string>
templates.all(
)
</expression-string>
<language-id>
Python
</language-id>
<evaluation-mode>
EXPRESSION
</evaluation-mode>
</expression>
</expressions>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/core/handlers/exception
.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/common/views
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
494
"
>
<caret
line=
"
59"
column=
"37"
lean-forward=
"false"
selection-start-line=
"59"
selection-start-column=
"37"
selection-end-line=
"59"
selection-end-column=
"37
"
/>
<state
relative-caret-position=
"
220
"
>
<caret
line=
"
66"
column=
"38"
lean-forward=
"false"
selection-start-line=
"66"
selection-start-column=
"38"
selection-end-line=
"66"
selection-end-column=
"38
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/views/__init__
.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/contrib/messages/views
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
187
"
>
<caret
line=
"
11"
column=
"5"
lean-forward=
"false"
selection-start-line=
"11"
selection-start-column=
"5"
selection-end-line=
"11"
selection-end-column=
"5
"
/>
<state
relative-caret-position=
"
51
"
>
<caret
line=
"
3"
column=
"6"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"6"
selection-end-line=
"3"
selection-end-column=
"6
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/circle/os_policies/neutron_policy.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"455"
>
<caret
line=
"234"
column=
"1"
lean-forward=
"false"
selection-start-line=
"234"
selection-start-column=
"1"
selection-end-line=
"234"
selection-end-column=
"1"
/>
</state>
<entry
file=
"file://$PROJECT_DIR$/circle/static_collected/jsPlumb/demo/logo.svg"
>
<provider
selected=
"true"
editor-type-id=
"images"
>
<state
/>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/glance_policy.json
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
static_collected/js/network.js
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
183
"
>
<caret
line=
"
46"
column=
"0"
lean-forward=
"true"
selection-start-line=
"46"
selection-start-column=
"0"
selection-end-line=
"46
"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"
-1540
"
>
<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/
common/models.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/templates/network/editor.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
185
"
>
<caret
line=
"
280"
column=
"19"
lean-forward=
"false"
selection-start-line=
"280"
selection-start-column=
"11"
selection-end-line=
"280"
selection-end-column=
"19
"
/>
<state
relative-caret-position=
"
760
"
>
<caret
line=
"
51"
column=
"24"
lean-forward=
"false"
selection-start-line=
"51"
selection-start-column=
"17"
selection-end-line=
"51"
selection-end-column=
"24
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
acl/models
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/settings/static_and_pipeline
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-515"
>
<caret
line=
"59"
column=
"13"
lean-forward=
"false"
selection-start-line=
"59"
selection-start-column=
"4"
selection-end-line=
"59"
selection-end-column=
"13"
/>
<folding
/>
<state
relative-caret-position=
"624"
>
<caret
line=
"157"
column=
"10"
lean-forward=
"false"
selection-start-line=
"157"
selection-start-column=
"10"
selection-end-line=
"157"
selection-end-column=
"10"
/>
</state>
</provider>
</entry>
<entry
file=
"file://
/usr/lib/python2.7/collection
s.py"
>
<entry
file=
"file://
$PROJECT_DIR$/circle/openstack_auth/view
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
171
"
>
<caret
line=
"
137"
column=
"8"
lean-forward=
"false"
selection-start-line=
"137"
selection-start-column=
"8"
selection-end-line=
"137"
selection-end-column=
"8
"
/>
<state
relative-caret-position=
"
-612
"
>
<caret
line=
"
0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://
/usr/lib/python2.7/importlib/__init__.py
"
>
<entry
file=
"file://
$PROJECT_DIR$/circle/dashboard/templates/auth/login.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"377"
>
<caret
line=
"36"
column=
"0"
lean-forward=
"false"
selection-start-line=
"36"
selection-start-column=
"0"
selection-end-line=
"36"
selection-end-column=
"0"
/>
<folding
/>
<state
relative-caret-position=
"510"
>
<caret
line=
"30"
column=
"33"
lean-forward=
"false"
selection-start-line=
"30"
selection-start-column=
"33"
selection-end-line=
"30"
selection-end-column=
"33"
/>
<folding>
<element
signature=
"n#style#0;n#h4#0;n#div#2;n#div#0;n#!!top"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/apps/registry.py
"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/templates/registration/login.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
171
"
>
<caret
line=
"
246"
column=
"0"
lean-forward=
"false"
selection-start-line=
"246"
selection-start-column=
"0"
selection-end-line=
"246"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
0
"
>
<caret
line=
"
0"
column=
"28"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"28"
selection-end-line=
"0"
selection-end-column=
"28
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/contrib/auth/base_
user.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/views/
user.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
171
"
>
<caret
line=
"
51"
column=
"0"
lean-forward=
"false"
selection-start-line=
"51"
selection-start-column=
"0"
selection-end-line=
"51
"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"
272
"
>
<caret
line=
"
105"
column=
"0"
lean-forward=
"true"
selection-start-line=
"105"
selection-start-column=
"0"
selection-end-line=
"105
"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/contrib/auth/model
s.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/network/form
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
51
"
>
<caret
line=
"3
"
column=
"0"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"0"
selection-end-line=
"3
"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"
794
"
>
<caret
line=
"3
92"
column=
"0"
lean-forward=
"true"
selection-start-line=
"392"
selection-start-column=
"0"
selection-end-line=
"392
"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/openstack_auth/user
.py"
>
<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=
"182"
>
<caret
line=
"137"
column=
"17"
lean-forward=
"false"
selection-start-line=
"137"
selection-start-column=
"17"
selection-end-line=
"137"
selection-end-column=
"17"
/>
<folding>
<element
signature=
"e#546#561#0"
expanded=
"false"
/>
</folding>
<state
relative-caret-position=
"132"
>
<caret
line=
"276"
column=
"0"
lean-forward=
"false"
selection-start-line=
"276"
selection-start-column=
"0"
selection-end-line=
"276"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_auth/__init__
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/models
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
0
"
>
<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
relative-caret-position=
"
471
"
>
<caret
line=
"
56"
column=
"9"
lean-forward=
"true"
selection-start-line=
"56"
selection-start-column=
"9"
selection-end-line=
"56"
selection-end-column=
"9
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/cinder_policy.json
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/urls.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2754"
>
<caret
line=
"162"
column=
"1"
lean-forward=
"false"
selection-start-line=
"162"
selection-start-column=
"1"
selection-end-line=
"162"
selection-end-column=
"1"
/>
<state
relative-caret-position=
"140"
>
<caret
line=
"18"
column=
"0"
lean-forward=
"false"
selection-start-line=
"18"
selection-start-column=
"0"
selection-end-line=
"18"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/base
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/views
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"171"
>
<caret
line=
"118"
column=
"0"
lean-forward=
"false"
selection-start-line=
"118"
selection-start-column=
"0"
selection-end-line=
"118"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"132"
>
<caret
line=
"50"
column=
"0"
lean-forward=
"false"
selection-start-line=
"50"
selection-start-column=
"0"
selection-end-line=
"50"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/oslo_policy/policy.py
"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vxlans.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
163
"
>
<caret
line=
"
540"
column=
"0"
lean-forward=
"false"
selection-start-line=
"540"
selection-start-column=
"0"
selection-end-line=
"540"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
238
"
>
<caret
line=
"
14"
column=
"28"
lean-forward=
"false"
selection-start-line=
"14"
selection-start-column=
"22"
selection-end-line=
"14"
selection-end-column=
"28
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_auth/policy.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/index.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"299"
>
<caret
line=
"156"
column=
"0"
lean-forward=
"false"
selection-start-line=
"156"
selection-start-column=
"0"
selection-end-line=
"156"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"306"
>
<caret
line=
"18"
column=
"36"
lean-forward=
"false"
selection-start-line=
"18"
selection-start-column=
"36"
selection-end-line=
"18"
selection-end-column=
"36"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/
util
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/views/
index
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4437"
>
<caret
line=
"290"
column=
"50"
lean-forward=
"false"
selection-start-line=
"290"
selection-start-column=
"50"
selection-end-line=
"290"
selection-end-column=
"50"
/>
<folding
/>
<state
relative-caret-position=
"436"
>
<caret
line=
"108"
column=
"9"
lean-forward=
"false"
selection-start-line=
"108"
selection-start-column=
"9"
selection-end-line=
"108"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"e#731#787#0"
expanded=
"false"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/nova_policy.json
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/models.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
88
4"
>
<caret
line=
"
52"
column=
"0"
lean-forward=
"false"
selection-start-line=
"52"
selection-start-column=
"0"
selection-end-line=
"52"
selection-end-column=
"0
"
/>
<state
relative-caret-position=
"
19
4"
>
<caret
line=
"
63"
column=
"6"
lean-forward=
"false"
selection-start-line=
"63"
selection-start-column=
"6"
selection-end-line=
"63"
selection-end-column=
"6
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
acl/management/commands/update_levels
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/storage
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
...
...
@@ -684,264 +661,257 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
common/operation
s.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
storage/model
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
426
"
>
<caret
line=
"
74"
column=
"41"
lean-forward=
"false"
selection-start-line=
"74"
selection-start-column=
"41"
selection-end-line=
"74"
selection-end-column=
"41
"
/>
<state
relative-caret-position=
"
163
"
>
<caret
line=
"
120"
column=
"0"
lean-forward=
"false"
selection-start-line=
"120"
selection-start-column=
"0"
selection-end-line=
"120"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/db/models/base.py
"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/templates/dashboard/_template-create.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"306"
>
<caret
line=
"470"
column=
"6"
lean-forward=
"false"
selection-start-line=
"470"
selection-start-column=
"6"
selection-end-line=
"470"
selection-end-column=
"6"
/>
<folding
/>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"15"
lean-forward=
"true"
selection-start-line=
"0"
selection-start-column=
"15"
selection-end-line=
"1"
selection-end-column=
"28"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
vm/models/common
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/glance
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-816"
>
<caret
line=
"29"
column=
"41"
lean-forward=
"false"
selection-start-line=
"29"
selection-start-column=
"41"
selection-end-line=
"29"
selection-end-column=
"41"
/>
<folding>
<element
signature=
"e#732#788#0"
expanded=
"false"
/>
</folding>
<state
relative-caret-position=
"-1581"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
firewall/models
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/template
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
182
"
>
<caret
line=
"
357"
column=
"48"
lean-forward=
"false"
selection-start-line=
"357"
selection-start-column=
"48"
selection-end-line=
"357"
selection-end-column=
"48
"
/>
<state
relative-caret-position=
"
-90
"
>
<caret
line=
"
105"
column=
"22"
lean-forward=
"false"
selection-start-line=
"105"
selection-start-column=
"22"
selection-end-line=
"105"
selection-end-column=
"22
"
/>
<folding>
<
element
signature=
"e#757#789#0"
expanded=
"fals
e"
/>
<
marker
date=
"1518171677270"
expanded=
"true"
signature=
"9976:10189"
ph=
"SELECT count... vm_instanc
e"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/views/vm
.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/forms/forms
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
47
6"
>
<caret
line=
"
141"
column=
"39"
lean-forward=
"false"
selection-start-line=
"141"
selection-start-column=
"39"
selection-end-line=
"141"
selection-end-column=
"39
"
/>
<state
relative-caret-position=
"
36
6"
>
<caret
line=
"
509"
column=
"6"
lean-forward=
"false"
selection-start-line=
"509"
selection-start-column=
"6"
selection-end-line=
"509"
selection-end-column=
"6
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/dashboard/models
.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/base
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"182"
>
<caret
line=
"359"
column=
"58"
lean-forward=
"false"
selection-start-line=
"359"
selection-start-column=
"58"
selection-end-line=
"359"
selection-end-column=
"58"
/>
<folding>
<element
signature=
"e#732#770#0"
expanded=
"false"
/>
</folding>
<state
relative-caret-position=
"195"
>
<caret
line=
"87"
column=
"0"
lean-forward=
"false"
selection-start-line=
"87"
selection-start-column=
"0"
selection-end-line=
"87"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/settings/base.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/nojs-wrapper.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"313"
>
<caret
line=
"541"
column=
"35"
lean-forward=
"true"
selection-start-line=
"541"
selection-start-column=
"35"
selection-end-line=
"541"
selection-end-column=
"35"
/>
<folding>
<element
signature=
"e#782#791#0"
expanded=
"false"
/>
</folding>
<state
relative-caret-position=
"0"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"3"
selection-end-column=
"19"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
vm/operations.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/_vm-create-1.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
299
"
>
<caret
line=
"
198"
column=
"25"
lean-forward=
"true"
selection-start-line=
"198"
selection-start-column=
"25"
selection-end-line=
"198"
selection-end-column=
"25
"
/>
<state
relative-caret-position=
"
391
"
>
<caret
line=
"
95"
column=
"34"
lean-forward=
"false"
selection-start-line=
"95"
selection-start-column=
"34"
selection-end-line=
"95"
selection-end-column=
"34
"
/>
<folding>
<element
signature=
"
e#732#788#0"
expanded=
"fals
e"
/>
<element
signature=
"
n#style#0;n#a#0;n#div#1;n#div#0;n#!!top"
expanded=
"tru
e"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/index.html
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/os_policies/keystone_policy.json
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4
71
"
>
<caret
line=
"
39"
column=
"41"
lean-forward=
"true"
selection-start-line=
"39"
selection-start-column=
"41"
selection-end-line=
"39"
selection-end-column=
"41
"
/>
<state
relative-caret-position=
"4
25
"
>
<caret
line=
"
61"
column=
"39"
lean-forward=
"false"
selection-start-line=
"61"
selection-start-column=
"39"
selection-end-line=
"61"
selection-end-column=
"39
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/urls.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=
"-931"
>
<caret
line=
"55"
column=
"61"
lean-forward=
"false"
selection-start-line=
"55"
selection-start-column=
"61"
selection-end-line=
"55"
selection-end-column=
"61"
/>
<folding>
<element
signature=
"e#732#770#0"
expanded=
"false"
/>
</folding>
<state
relative-caret-position=
"298"
>
<caret
line=
"37"
column=
"56"
lean-forward=
"false"
selection-start-line=
"37"
selection-start-column=
"56"
selection-end-line=
"37"
selection-end-column=
"56"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/urls.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/_vm-create-2.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
8
5"
>
<caret
line=
"
33"
column=
"36"
lean-forward=
"false"
selection-start-line=
"33"
selection-start-column=
"36"
selection-end-line=
"33"
selection-end-column=
"36
"
/>
<state
relative-caret-position=
"
42
5"
>
<caret
line=
"
25"
column=
"31"
lean-forward=
"false"
selection-start-line=
"25"
selection-start-column=
"31"
selection-end-line=
"26"
selection-end-column=
"17
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
acl/views
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_auth/policy
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-89
"
>
<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
relative-caret-position=
"
126
"
>
<caret
line=
"
23"
column=
"0"
lean-forward=
"false"
selection-start-line=
"23"
selection-start-column=
"0"
selection-end-line=
"23
"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/conf/urls/__init__
.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/openstack_api/policy
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"3
18
"
>
<caret
line=
"
57"
column=
"45"
lean-forward=
"true"
selection-start-line=
"57"
selection-start-column=
"45"
selection-end-line=
"57"
selection-end-column=
"45
"
/>
<state
relative-caret-position=
"3
4
"
>
<caret
line=
"
14"
column=
"18"
lean-forward=
"false"
selection-start-line=
"14"
selection-start-column=
"18"
selection-end-line=
"14"
selection-end-column=
"18
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/urls
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/neutron
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
057
"
>
<caret
line=
"
138"
column=
"34"
lean-forward=
"false"
selection-start-line=
"138"
selection-start-column=
"34"
selection-end-line=
"138"
selection-end-column=
"34
"
/>
<state
relative-caret-position=
"2
55
"
>
<caret
line=
"
39"
column=
"18"
lean-forward=
"false"
selection-start-line=
"39"
selection-start-column=
"18"
selection-end-line=
"39"
selection-end-column=
"18
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/circle/os_policies/keystone_policy.json
"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
81
6"
>
<caret
line=
"
48"
column=
"24"
lean-forward=
"false"
selection-start-line=
"48"
selection-start-column=
"14"
selection-end-line=
"48"
selection-end-column=
"24
"
/>
<state
relative-caret-position=
"
12
6"
>
<caret
line=
"
124"
column=
"0"
lean-forward=
"false"
selection-start-line=
"124"
selection-start-column=
"0"
selection-end-line=
"124"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/
forms/model
s.py"
>
<entry
file=
"file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/
utils/datastructure
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
273
"
>
<caret
line=
"
276"
column=
"0"
lean-forward=
"false"
selection-start-line=
"276"
selection-start-column=
"0"
selection-end-line=
"276
"
selection-end-column=
"0"
/>
<state
relative-caret-position=
"
126
"
>
<caret
line=
"
125"
column=
"0"
lean-forward=
"false"
selection-start-line=
"125"
selection-start-column=
"0"
selection-end-line=
"125
"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/common/view
s.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/server
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
20
"
>
<caret
line=
"
66"
column=
"38"
lean-forward=
"false"
selection-start-line=
"66"
selection-start-column=
"38"
selection-end-line=
"66"
selection-end-column=
"38
"
/>
<state
relative-caret-position=
"2
62
"
>
<caret
line=
"
1221"
column=
"51"
lean-forward=
"false"
selection-start-line=
"1221"
selection-start-column=
"51"
selection-end-line=
"1221"
selection-end-column=
"51
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/contrib/messages/views
.py"
>
<entry
file=
"file://$
PROJECT_DIR$/circle/openstack_api/nova
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
5
1"
>
<caret
line=
"
3"
column=
"6"
lean-forward=
"false"
selection-start-line=
"3"
selection-start-column=
"6"
selection-end-line=
"3"
selection-end-column=
"6
"
/>
<state
relative-caret-position=
"
10
1"
>
<caret
line=
"
510"
column=
"58"
lean-forward=
"false"
selection-start-line=
"510"
selection-start-column=
"58"
selection-end-line=
"510"
selection-end-column=
"58
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
network/forms.py
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/vm-plain-image-create.html
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
39
"
>
<caret
line=
"
294"
column=
"48"
lean-forward=
"false"
selection-start-line=
"294"
selection-start-column=
"48"
selection-end-line=
"294"
selection-end-column=
"48
"
/>
<state
relative-caret-position=
"2
21
"
>
<caret
line=
"
13"
column=
"40"
lean-forward=
"true"
selection-start-line=
"13"
selection-start-column=
"40"
selection-end-line=
"13"
selection-end-column=
"40
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
network
/models.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard
/models.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"182"
>
<caret
line=
"
79"
column=
"32"
lean-forward=
"true"
selection-start-line=
"79"
selection-start-column=
"32"
selection-end-line=
"79"
selection-end-column=
"32
"
/>
<caret
line=
"
359"
column=
"40"
lean-forward=
"true"
selection-start-line=
"359"
selection-start-column=
"40"
selection-end-line=
"359"
selection-end-column=
"40
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/network/views
.py"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/db/models/base
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
24
6"
>
<caret
line=
"
1021"
column=
"19"
lean-forward=
"false"
selection-start-line=
"1021"
selection-start-column=
"19"
selection-end-line=
"1021"
selection-end-column=
"19
"
/>
<state
relative-caret-position=
"
12
6"
>
<caret
line=
"
474"
column=
"0"
lean-forward=
"false"
selection-start-line=
"474"
selection-start-column=
"0"
selection-end-line=
"474"
selection-end-column=
"0
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/static_collected/jsPlumb/demo/logo.svg"
>
<provider
selected=
"true"
editor-type-id=
"images"
>
<state
/>
<entry
file=
"file://$PROJECT_DIR$/circle/common/operations.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-233"
>
<caret
line=
"159"
column=
"6"
lean-forward=
"false"
selection-start-line=
"159"
selection-start-column=
"6"
selection-end-line=
"159"
selection-end-column=
"6"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
static_collected/js/network.js
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/forms.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-1540"
>
<caret
line=
"0"
column=
"0"
lean-forward=
"false"
selection-start-line=
"0"
selection-start-column=
"0"
selection-end-line=
"0"
selection-end-column=
"0"
/>
<folding
/>
<state
relative-caret-position=
"516"
>
<caret
line=
"150"
column=
"9"
lean-forward=
"true"
selection-start-line=
"150"
selection-start-column=
"9"
selection-end-line=
"150"
selection-end-column=
"9"
/>
<folding>
<element
signature=
"e#732#770#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$
PROJECT_DIR$/circle/network/templates/network/editor.html
"
>
<entry
file=
"file://$
USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/detail.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
760
"
>
<caret
line=
"
51"
column=
"24"
lean-forward=
"false"
selection-start-line=
"51"
selection-start-column=
"17"
selection-end-line=
"51"
selection-end-column=
"24
"
/>
<state
relative-caret-position=
"
126
"
>
<caret
line=
"
21"
column=
"8"
lean-forward=
"false"
selection-start-line=
"21"
selection-start-column=
"8"
selection-end-line=
"21"
selection-end-column=
"8
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
circle/settings/static_and_pipeline
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/vm
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"624"
>
<caret
line=
"157"
column=
"10"
lean-forward=
"false"
selection-start-line=
"157"
selection-start-column=
"10"
selection-end-line=
"157"
selection-end-column=
"10"
/>
<folding
/>
<state
relative-caret-position=
"189"
>
<caret
line=
"109"
column=
"8"
lean-forward=
"false"
selection-start-line=
"109"
selection-start-column=
"8"
selection-end-line=
"109"
selection-end-column=
"81"
/>
<folding>
<element
signature=
"e#40141#41312#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=
"
-226
"
>
<caret
line=
"
212"
column=
"11"
lean-forward=
"false"
selection-start-line=
"212"
selection-start-column=
"11"
selection-end-line=
"212"
selection-end-column=
"11
"
/>
<state
relative-caret-position=
"
308
"
>
<caret
line=
"
485"
column=
"46"
lean-forward=
"true"
selection-start-line=
"485"
selection-start-column=
"46"
selection-end-line=
"485"
selection-end-column=
"46
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/form
s.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
request/url
s.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"323"
>
<caret
line=
"1076"
column=
"28"
lean-forward=
"true"
selection-start-line=
"1076"
selection-start-column=
"28"
selection-end-line=
"1076"
selection-end-column=
"28"
/>
<folding>
<element
signature=
"e#732#770#0"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"601"
>
<caret
line=
"61"
column=
"161"
lean-forward=
"false"
selection-start-line=
"61"
selection-start-column=
"161"
selection-end-line=
"61"
selection-end-column=
"161"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
views/user
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/dashboard/
urls
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
306
"
>
<caret
line=
"
107"
column=
"29"
lean-forward=
"false"
selection-start-line=
"107"
selection-start-column=
"29"
selection-end-line=
"107"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"
133
"
>
<caret
line=
"
59"
column=
"46"
lean-forward=
"true"
selection-start-line=
"59"
selection-start-column=
"46"
selection-end-line=
"59"
selection-end-column=
"46
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_auth/views
.py"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/views/util
.py"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
-612
"
>
<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
relative-caret-position=
"
206
"
>
<caret
line=
"
242"
column=
"0"
lean-forward=
"false"
selection-start-line=
"242"
selection-start-column=
"0"
selection-end-line=
"242
"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
templates/registration/login
.html"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/dashboard/index-vm
.html"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"0"
>
<caret
line=
"
0"
column=
"28"
lean-forward=
"true"
selection-start-line=
"0"
selection-start-column=
"28"
selection-end-line=
"0"
selection-end-column=
"28
"
/>
<state
relative-caret-position=
"
23
0"
>
<caret
line=
"
95"
column=
"36"
lean-forward=
"true"
selection-start-line=
"95"
selection-start-column=
"36"
selection-end-line=
"95"
selection-end-column=
"36
"
/>
<folding
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/circle/
dashboard/templates/auth/login.html
"
>
<entry
file=
"file://$PROJECT_DIR$/circle/
openstack_api/__init__.py
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"714"
>
<caret
line=
"42"
column=
"0"
lean-forward=
"false"
selection-start-line=
"42"
selection-start-column=
"0"
selection-end-line=
"42"
selection-end-column=
"0"
/>
<folding>
<element
signature=
"n#style#0;n#h4#0;n#div#2;n#div#0;n#!!top"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"284"
>
<caret
line=
"38"
column=
"0"
lean-forward=
"false"
selection-start-line=
"38"
selection-start-column=
"0"
selection-end-line=
"38"
selection-end-column=
"0"
/>
<folding
/>
</state>
</provider>
</entry>
...
...
circle/circle/db.sqlite3
View file @
327e7892
No preview for this file type
circle/dashboard/forms.py
View file @
327e7892
...
...
@@ -20,6 +20,7 @@ from __future__ import absolute_import
from
datetime
import
timedelta
from
urlparse
import
urlparse
import
openstack_api
import
pyotp
from
django.forms
import
ModelForm
...
...
@@ -107,6 +108,47 @@ class VmSaveForm(OperationForm):
help_text
=
_
(
"Clone the access list of parent template. Useful "
"for updating a template."
))
class
VmFromPlainImageForm
(
forms
.
Form
):
name
=
forms
.
CharField
(
widget
=
forms
.
TextInput
(
attrs
=
{
'class'
:
"form-control"
,
'required'
:
""
,
}))
image
=
forms
.
ChoiceField
([],
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control input-tags"
,
}))
flavor
=
forms
.
ChoiceField
([],
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control input-tags"
,
}))
network
=
forms
.
ChoiceField
([],
widget
=
forms
.
Select
(
attrs
=
{
'class'
:
"form-control input-tags"
,
}))
def
__init__
(
self
,
request
,
*
args
,
**
kwargs
):
super
(
VmFromPlainImageForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)[
0
]
#TODO: flatten?
def
sizeof_fmt
(
num
,
suffix
=
'B'
):
for
unit
in
[
''
,
'K'
,
'M'
,
'G'
,
'T'
]:
if
abs
(
num
)
<
1024.0
:
return
"
%3.1
f
%
s
%
s"
%
(
num
,
unit
,
suffix
)
num
/=
1024.0
return
"
%.1
f
%
s
%
s"
%
(
num
,
'Yi'
,
suffix
)
self
.
fields
[
'image'
]
.
choices
=
(
(
image
.
id
,
'
%
s -
%
s'
%
(
image
.
name
,
sizeof_fmt
(
image
.
size
)))
for
image
in
images
)
flavors
=
openstack_api
.
nova
.
flavor_list
(
request
)
#TODO: flattent
self
.
fields
[
'flavor'
]
.
choices
=
(
(
flavor
.
id
,
'
%
s -
%
s CPUs,
%
s MB RAM'
%
(
flavor
.
name
,
flavor
.
vcpus
,
flavor
.
ram
))
for
flavor
in
flavors
)
networks
=
openstack_api
.
neutron
.
network_list_for_tenant
(
request
,
request
.
user
.
tenant_id
)
self
.
fields
[
'network'
]
.
choices
=
(
(
network
.
id
,
'
%
s'
%
(
network
.
name
))
for
network
in
networks
)
class
VmCustomizeForm
(
forms
.
Form
):
name
=
forms
.
CharField
(
widget
=
forms
.
TextInput
(
attrs
=
{
...
...
circle/dashboard/templates/dashboard/_vm-create-1.html
View file @
327e7892
{% load sizefieldtags %}
{% load i18n %}
{% load crispy_forms_tags %}
<div
class=
"vm-create-template-list"
>
{% for t in templates %}
...
...
@@ -87,17 +88,28 @@
{% include "request/_request-template-form.html" %}
{% endif %}
{% endfor %}
<div
class=
"vm-create-template"
>
<a
href=
"{% url "
dashboard
.
views
.
vm-plain-image-create
"
%}"
style=
"text-decoration: none; color: #333333"
>
<div
class=
"vm-create-template-summary"
>
<span
class=
"vm-create-list-name"
>
New VM from plain OS image
</span>
<div
class=
"clearfix"
></div>
</div>
</a>
</div>
</div>
{% if templates and template_access_types %}
{% url "request.views.request-template" as request_url %}
<hr
/>
<p
class=
"text-right"
>
{% blocktrans with url=request_url %}
Need other templates? Submit a new
<a
href=
"{{ url }}"
>
request
</a>
.
{% endblocktrans %}
</p>
{% endif %}
{% if templates and template_access_types %}
{% url "request.views.request-template" as request_url %}
<hr
/>
<p
class=
"text-right"
>
{% blocktrans with url=request_url %}
Need other templates? Submit a new
<a
href=
"{{ url }}"
>
request
</a>
.
{% endblocktrans %}
</p>
{% endif %}
<style>
.progress
{
...
...
circle/dashboard/templates/dashboard/vm-plain-image-create.html
0 → 100644
View file @
327e7892
{% extends "dashboard/base.html" %}
{% load sizefieldtags %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load staticfiles %}
{% block content %}
<form
method=
"POST"
action=
"{% url "
dashboard
.
views
.
vm-plain-image-create
"
%}
"
>
{% csrf_token %}
{{ form.name|as_crispy_field }}
{{ form.image|as_crispy_field }}
{{ form.flavor|as_crispy_field }}
{# {{ form.network|as_crispy_field }}#}
<button
class=
"btn btn-success btn-xs vm-create-start pull-right text-right"
type=
"submit"
>
<i
class=
"fa fa-play"
></i>
{% trans "Start" %}
</button>
</form>
{% endblock %}
\ No newline at end of file
circle/dashboard/urls.py
View file @
327e7892
...
...
@@ -18,7 +18,7 @@
from
__future__
import
absolute_import
from
dashboard.views.autocomplete
import
AclUserGroupAutocomplete
,
AclUserAutocomplete
from
dashboard.views.vm
import
VmDetailView
,
VmList
,
VmCreate
,
vm_activity
,
vm_ops
,
FavouriteView
from
dashboard.views.vm
import
VmDetailView
,
VmList
,
VmCreate
,
vm_activity
,
vm_ops
,
FavouriteView
,
VmPlainImageCreate
from
django.conf.urls
import
url
from
.views
import
(
...
...
@@ -55,7 +55,7 @@ urlpatterns = [
# name="dashboard.views.template-delete"),
# url(r'^template/(?P<pk>\d+)/tx/$', TransferTemplateOwnershipView.as_view(),
# name='dashboard.views.template-transfer-ownership'),
url
(
r'^vm/(?P<pk>
\d+
)/$'
,
VmDetailView
.
as_view
(),
url
(
r'^vm/(?P<pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/$'
,
VmDetailView
.
as_view
(),
name
=
'dashboard.views.detail'
),
# url(r'^vm/(?P<pk>\d+)/vnctoken/$', VmDetailVncTokenView.as_view(),
# name='dashboard.views.detail-vnc'),
...
...
@@ -64,9 +64,9 @@ urlpatterns = [
# url(r'^vm/(?P<pk>\d+)/tx/$', TransferInstanceOwnershipView.as_view(),
# name='dashboard.views.vm-transfer-ownership'),
url
(
r'^vm/list/$'
,
VmList
.
as_view
(),
name
=
'dashboard.views.vm-list'
),
url
(
r'^vm/create/$'
,
VmCreate
.
as_view
(),
name
=
'dashboard.views.vm
-create'
),
url
(
r'^vm/(?P<pk>
\d+
)/activity/$'
,
vm_activity
,
url
(
r'^vm/create/$'
,
VmCreate
.
as_view
(),
name
=
'dashboard.views.vm-create'
),
url
(
r'^vm-plain-image-create$'
,
VmPlainImageCreate
.
as_view
(),
name
=
'dashboard.views.vm-plain-image
-create'
),
url
(
r'^vm/(?P<pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/activity/$'
,
vm_activity
,
name
=
'dashboard.views.vm-activity-list'
),
# url(r'^vm/activity/(?P<pk>\d+)/$', InstanceActivityDetail.as_view(),
# name='dashboard.views.vm-activity'),
...
...
@@ -223,7 +223,7 @@ urlpatterns = [
]
urlpatterns
+=
[
url
(
r'^vm/(?P<pk>
\d+
)/op/
%
s/$'
%
op
,
v
.
as_view
(),
name
=
v
.
get_urlname
())
url
(
r'^vm/(?P<pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/op/
%
s/$'
%
op
,
v
.
as_view
(),
name
=
v
.
get_urlname
())
for
op
,
v
in
vm_ops
.
iteritems
()
]
#
...
...
circle/dashboard/views/index.py
View file @
327e7892
...
...
@@ -105,6 +105,9 @@ class IndexView(LoginRequiredMixin, TemplateView):
context
[
'templates'
]
=
InstanceTemplate
.
get_objects_with_level
(
'operator'
,
user
,
disregard_superuser
=
True
)
.
all
()[:
5
]
# vxlan
#context['vxlans'] = Instance.list_from_os(self.request)[:5]
# toplist
if
settings
.
STORE_URL
:
cache_key
=
"files-
%
d"
%
self
.
request
.
user
.
pk
...
...
circle/dashboard/views/util.py
View file @
327e7892
...
...
@@ -42,6 +42,7 @@ from django.views.decorators.csrf import csrf_protect
from
django.views.decorators.debug
import
sensitive_post_parameters
from
django.views.generic
import
DetailView
,
View
,
DeleteView
,
FormView
from
django.views.generic.detail
import
SingleObjectMixin
from
vm.models
import
Instance
from
..models
import
GroupProfile
...
...
@@ -238,6 +239,9 @@ class OperationView(RedirectToLoginMixin, DetailView):
else
:
return
[
'dashboard/_base.html'
]
def
get_object
(
self
):
return
Instance
(
os_server_id
=
self
.
kwargs
[
'pk'
])
.
get_from_os
(
self
.
request
)
@classmethod
def
get_op_by_object
(
cls
,
obj
):
return
getattr
(
obj
,
cls
.
op
)
...
...
circle/dashboard/views/vm.py
View file @
327e7892
...
...
@@ -48,17 +48,19 @@ from common.models import (
)
from
firewall.models
import
Vlan
,
Host
,
Rule
from
manager.scheduler
import
SchedulerError
from
request.forms
import
TemplateRequestForm
from
request.models
import
TemplateAccessType
from
storage.models
import
Disk
from
vm.models
import
(
Instance
,
InstanceActivity
,
Interface
,
)
InstanceTemplate
)
from
.util
import
(
CheckedDetailView
,
AjaxOperationMixin
,
OperationView
,
AclUpdateView
,
FormOperationMixin
,
FilterMixin
,
GraphMixin
)
from
..forms
import
(
AclUserOrGroupAddForm
,
VmResourcesForm
,
VmCustomizeForm
,
VmDeployForm
)
AclUserOrGroupAddForm
,
VmResourcesForm
,
VmCustomizeForm
,
VmDeployForm
,
VmFromPlainImageForm
)
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -105,7 +107,7 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
"password"
:
instance
.
pw
}
def
get_object
(
self
,
queryset
=
None
):
return
super
(
VmDetailView
,
self
)
.
get_object
(
queryset
)
.
get_from_os
(
self
.
request
)
return
Instance
(
os_server_id
=
self
.
kwargs
[
'pk'
]
)
.
get_from_os
(
self
.
request
)
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
VmDetailView
,
self
)
.
get_context_data
(
**
kwargs
)
...
...
@@ -1007,6 +1009,28 @@ class VmList(LoginRequiredMixin, FilterMixin, ListView):
"interface_set__host"
)
.
distinct
()
class
VmPlainImageCreate
(
LoginRequiredMixin
,
TemplateView
):
form_class
=
VmFromPlainImageForm
template_name
=
"dashboard/vm-plain-image-create.html"
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
context
=
self
.
get_context_data
(
**
kwargs
)
context
.
update
({
'form'
:
VmFromPlainImageForm
(
request
),
})
return
self
.
render_to_response
(
context
)
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
server_created
=
openstack_api
.
nova
.
server_create
(
request
,
request
.
POST
.
get
(
"name"
),
request
.
POST
.
get
(
"image"
),
request
.
POST
.
get
(
"flavor"
),
)
return
HttpResponseRedirect
(
"vm/
%
s#activity"
%
server_created
.
id
)
class
VmCreate
(
LoginRequiredMixin
,
TemplateView
):
form_class
=
VmCustomizeForm
...
...
@@ -1030,9 +1054,6 @@ class VmCreate(LoginRequiredMixin, TemplateView):
return
template
def
get
(
self
,
request
,
form
=
None
,
*
args
,
**
kwargs
):
if
not
request
.
user
.
has_perm
(
'vm.create_vm'
):
raise
PermissionDenied
()
if
form
is
None
:
template_pk
=
request
.
GET
.
get
(
"template"
)
else
:
...
...
@@ -1043,8 +1064,9 @@ class VmCreate(LoginRequiredMixin, TemplateView):
if
form
is
None
:
form
=
self
.
form_class
(
user
=
request
.
user
,
template
=
template
)
else
:
templates
=
InstanceTemplate
.
get_objects_with_level
(
'user'
,
request
.
user
,
disregard_superuser
=
True
)
templates
=
InstanceTemplate
.
objects
images
=
openstack_api
.
glance
.
image_list_detailed
(
request
)
context
=
self
.
get_context_data
(
**
kwargs
)
if
template_pk
:
...
...
@@ -1062,17 +1084,20 @@ class VmCreate(LoginRequiredMixin, TemplateView):
'ajax_title'
:
True
,
'templates'
:
templates
.
all
(),
'template_access_types'
:
TemplateAccessType
.
objects
.
exists
(),
'form'
:
TemplateRequestForm
(
request
=
request
)
,
'form'
:
TemplateRequestForm
(
request
=
request
)
})
return
self
.
render_to_response
(
context
)
def
__create_normal
(
self
,
request
,
template
,
*
args
,
**
kwargs
):
def
_create_from_plain_image
(
self
,
request
,
*
args
,
**
kwargs
):
pass
def
__create_normal
(
self
,
request
,
*
args
,
**
kwargs
):
instances
=
[
Instance
.
create_from_template
(
template
=
template
,
owner
=
request
.
user
)]
return
self
.
__deploy
(
request
,
instances
)
def
__create_customized
(
self
,
request
,
template
,
*
args
,
**
kwargs
):
def
__create_customized
(
self
,
request
,
*
args
,
**
kwargs
):
user
=
request
.
user
# no form yet, using POST directly:
form
=
self
.
form_class
(
...
...
@@ -1130,39 +1155,16 @@ class VmCreate(LoginRequiredMixin, TemplateView):
return
HttpResponseRedirect
(
"
%
s#activity"
%
path
)
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
user
=
request
.
user
#TODO: check if user can create VM
#TODO: limit chekcs
if
not
request
.
user
.
has_perm
(
'vm.create_vm'
):
raise
PermissionDenied
()
template
=
self
.
get_template
(
request
,
request
.
POST
.
get
(
"template"
))
# limit chekcs
try
:
limit
=
user
.
profile
.
instance_limit
except
Exception
as
e
:
logger
.
debug
(
'No profile or instance limit:
%
s'
,
e
)
else
:
try
:
amount
=
int
(
request
.
POST
.
get
(
"amount"
,
1
))
except
:
amount
=
limit
# TODO this should definitely use a Form
current
=
Instance
.
active
.
filter
(
owner
=
user
)
.
count
()
logger
.
debug
(
'current use:
%
d, limit:
%
d'
,
current
,
limit
)
if
current
+
amount
>
limit
:
messages
.
error
(
request
,
_
(
'Instance limit (
%
d) exceeded.'
)
%
limit
)
if
request
.
is_ajax
():
return
HttpResponse
(
json
.
dumps
({
'redirect'
:
'/'
}),
content_type
=
"application/json"
)
else
:
return
redirect
(
'/'
)
create_func
=
(
self
.
__create_normal
if
create_func
=
(
self
.
_create_from_plain_image
if
request
.
POST
.
get
(
"from_plain_image"
)
is
not
None
else
self
.
__create_normal
if
request
.
POST
.
get
(
"customized"
)
is
None
else
self
.
__create_customized
)
return
create_func
(
request
,
template
,
*
args
,
**
kwargs
)
return
create_func
(
request
,
*
args
,
**
kwargs
)
# @require_GET
...
...
circle/network/forms.py
View file @
327e7892
...
...
@@ -362,6 +362,7 @@ class VxlanSuperUserForm(ModelForm):
'vlan'
,
'description'
,
'comment'
,
'owner'
,
)
),
FormActions
(
...
...
@@ -371,11 +372,6 @@ class VxlanSuperUserForm(ModelForm):
)
)
class
Meta
:
model
=
Vxlan
fields
=
(
'name'
,
'vni'
,
'vlan'
,
'description'
,
'comment'
,
)
class
VxlanForm
(
ModelForm
):
helper
=
FormHelper
()
helper
.
layout
=
Layout
(
...
...
@@ -394,7 +390,3 @@ class VxlanForm(ModelForm):
'network.vxlan-list'
))
)
)
class
Meta
:
model
=
Vxlan
fields
=
(
'name'
,
'description'
,
'comment'
,
'vni'
,
)
circle/network/models.py
View file @
327e7892
...
...
@@ -18,6 +18,7 @@
from
django.db
import
models
from
django.core.validators
import
MinValueValidator
,
MaxValueValidator
from
django.core.urlresolvers
import
reverse
from
django.db.models
import
CharField
from
django.utils.translation
import
ugettext_lazy
as
_
from
django.contrib.contenttypes.fields
import
(
GenericRelation
,
GenericForeignKey
...
...
@@ -60,53 +61,12 @@ class Vxlan(models.Model):
"""
A virtual L2 network,
These networks are isolated by the vxlan (virtual extensible lan)
technology, which is commonly used by managed network switches
to partition the network, with a more scalable way opposite vlan
technology. Usually, it used over vlan networks.
Each vxlan network has a unique identifier (VNI), a name, and
a server vlan network.
"""
# NOTE: VXLAN VNI's maximal value is 2^24-1, but MAC address generator
# only supports 2^12-1 maximal value.
vni
=
models
.
IntegerField
(
unique
=
True
,
verbose_name
=
_
(
'VNI'
),
help_text
=
_
(
'VXLAN Network Identifier.'
),
validators
=
[
MinValueValidator
(
0
),
MaxValueValidator
(
2
**
12
-
1
)])
vlan
=
models
.
ForeignKey
(
Vlan
,
verbose_name
=
_
(
'vlan'
),
help_text
=
_
(
'The server vlan.'
))
name
=
models
.
CharField
(
max_length
=
20
,
verbose_name
=
_
(
'Name'
),
help_text
=
_
(
'The short name of the '
'virtual network.'
),
validators
=
[
val_alfanum
])
description
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'description'
),
help_text
=
_
(
'Description of the goals and elements '
'of the virtual network.'
))
comment
=
models
.
TextField
(
blank
=
True
,
verbose_name
=
_
(
'comment'
),
help_text
=
_
(
'Notes, comments about the network'
))
created_at
=
models
.
DateTimeField
(
auto_now_add
=
True
,
verbose_name
=
_
(
'created at'
))
modified_at
=
models
.
DateTimeField
(
auto_now
=
True
,
verbose_name
=
_
(
'modified at'
))
os_network_id
=
CharField
(
blank
=
False
,
max_length
=
100
,
unique
=
True
)
editor_elements
=
GenericRelation
(
EditorElement
)
class
Meta
:
app_label
=
'network'
verbose_name
=
_
(
"vxlan"
)
verbose_name_plural
=
_
(
"vxlans"
)
ordering
=
(
'vni'
,
)
permissions
=
(
(
'create_vxlan'
,
_
(
'Can create a Vxlan network.'
)),
)
def
__unicode__
(
self
):
return
self
.
name
...
...
circle/openstack_api/__init__.py
View file @
327e7892
...
...
@@ -33,10 +33,10 @@ Keystone/Nova/Glance/Swift et. al.
"""
from
openstack_api
import
base
# from openstack_api import cinder
#
from openstack_api import glance
from
openstack_api
import
glance
# from openstack_api import keystone
# from openstack_api import network
#
from openstack_api import neutron
from
openstack_api
import
neutron
from
openstack_api
import
nova
# from openstack_api import swift
...
...
circle/openstack_api/neutron.py
View file @
327e7892
...
...
@@ -32,14 +32,12 @@ from neutronclient.v2_0 import client as neutron_client
from
novaclient
import
exceptions
as
nova_exc
import
six
from
horizon
import
exceptions
from
horizon
import
messages
from
horizon.utils.memoized
import
memoized
from
openstack_dashboard.api
import
base
from
openstack_dashboard.api
import
nova
from
openstack_dashboard.contrib.developer.profiler
import
api
as
profiler
from
openstack_dashboard
import
policy
from
openstack_api
import
exceptions
from
openstack_api
import
messages
from
openstack_api.utils.memoized
import
memoized
from
openstack_api
import
base
from
openstack_api
import
nova
from
openstack_api
import
policy
LOG
=
logging
.
getLogger
(
__name__
)
...
...
@@ -326,7 +324,7 @@ class SecurityGroupManager(object):
secgroups
=
self
.
client
.
list_security_groups
(
**
filters
)
return
[
SecurityGroup
(
sg
)
for
sg
in
secgroups
.
get
(
'security_groups'
)]
@profiler.trace
def
list
(
self
,
**
params
):
"""Fetches a list all security groups.
...
...
@@ -348,7 +346,7 @@ class SecurityGroupManager(object):
related_sgs
=
related_sgs
.
get
(
'security_groups'
)
return
dict
((
sg
[
'id'
],
sg
[
'name'
])
for
sg
in
related_sgs
)
@profiler.trace
def
get
(
self
,
sg_id
):
"""Fetches the security group.
...
...
@@ -358,7 +356,7 @@ class SecurityGroupManager(object):
sg_dict
=
self
.
_sg_name_dict
(
sg_id
,
secgroup
[
'security_group_rules'
])
return
SecurityGroup
(
secgroup
,
sg_dict
)
@profiler.trace
def
create
(
self
,
name
,
desc
):
"""Create a new security group.
...
...
@@ -370,19 +368,19 @@ class SecurityGroupManager(object):
secgroup
=
self
.
client
.
create_security_group
(
body
)
return
SecurityGroup
(
secgroup
.
get
(
'security_group'
))
@profiler.trace
def
update
(
self
,
sg_id
,
name
,
desc
):
body
=
{
'security_group'
:
{
'name'
:
name
,
'description'
:
desc
}}
secgroup
=
self
.
client
.
update_security_group
(
sg_id
,
body
)
return
SecurityGroup
(
secgroup
.
get
(
'security_group'
))
@profiler.trace
def
delete
(
self
,
sg_id
):
"""Delete the specified security group."""
self
.
client
.
delete_security_group
(
sg_id
)
@profiler.trace
def
rule_create
(
self
,
parent_group_id
,
direction
=
None
,
ethertype
=
None
,
ip_protocol
=
None
,
from_port
=
None
,
to_port
=
None
,
...
...
@@ -429,12 +427,12 @@ class SecurityGroupManager(object):
sg_dict
=
self
.
_sg_name_dict
(
parent_group_id
,
[
rule
])
return
SecurityGroupRule
(
rule
,
sg_dict
)
@profiler.trace
def
rule_delete
(
self
,
sgr_id
):
"""Delete the specified security group rule."""
self
.
client
.
delete_security_group_rule
(
sgr_id
)
@profiler.trace
def
list_by_instance
(
self
,
instance_id
):
"""Gets security groups of an instance.
...
...
@@ -446,7 +444,7 @@ class SecurityGroupManager(object):
sg_ids
+=
p
.
security_groups
return
self
.
_list
(
id
=
set
(
sg_ids
))
if
sg_ids
else
[]
@profiler.trace
def
update_instance_security_group
(
self
,
instance_id
,
new_security_group_ids
):
"""Update security groups of a specified instance."""
...
...
@@ -516,7 +514,7 @@ class FloatingIpManager(object):
self
.
request
=
request
self
.
client
=
neutronclient
(
request
)
@profiler.trace
def
list_pools
(
self
):
"""Fetches a list of all floating IP pools.
...
...
@@ -543,7 +541,7 @@ class FloatingIpManager(object):
fip
[
'instance_id'
]
=
None
fip
[
'instance_type'
]
=
None
@profiler.trace
def
list
(
self
,
all_tenants
=
False
,
**
search_opts
):
"""Fetches a list of all floating IPs.
...
...
@@ -568,7 +566,7 @@ class FloatingIpManager(object):
self
.
_set_instance_info
(
fip
,
port_dict
.
get
(
fip
[
'port_id'
]))
return
[
FloatingIp
(
fip
)
for
fip
in
fips
]
@profiler.trace
def
get
(
self
,
floating_ip_id
):
"""Fetches the floating IP.
...
...
@@ -578,7 +576,7 @@ class FloatingIpManager(object):
self
.
_set_instance_info
(
fip
)
return
FloatingIp
(
fip
)
@profiler.trace
def
allocate
(
self
,
pool
,
tenant_id
=
None
,
**
params
):
"""Allocates a floating IP to the tenant.
...
...
@@ -602,12 +600,12 @@ class FloatingIpManager(object):
self
.
_set_instance_info
(
fip
)
return
FloatingIp
(
fip
)
@profiler.trace
def
release
(
self
,
floating_ip_id
):
"""Releases a floating IP specified."""
self
.
client
.
delete_floatingip
(
floating_ip_id
)
@profiler.trace
def
associate
(
self
,
floating_ip_id
,
port_id
):
"""Associates the floating IP to the port.
...
...
@@ -625,7 +623,7 @@ class FloatingIpManager(object):
self
.
client
.
update_floatingip
(
floating_ip_id
,
{
'floatingip'
:
update_dict
})
@profiler.trace
def
disassociate
(
self
,
floating_ip_id
):
"""Disassociates the floating IP specified."""
update_dict
=
{
'port_id'
:
None
}
...
...
@@ -659,7 +657,7 @@ class FloatingIpManager(object):
for
s
in
n
.
subnets
])
return
reachable_subnets
|
shared
@profiler.trace
def
list_targets
(
self
):
"""Returns a list of association targets of instance VIFs.
...
...
@@ -699,7 +697,7 @@ class FloatingIpManager(object):
search_opts
=
{
'device_id'
:
instance_id
}
return
port_list
(
self
.
request
,
**
search_opts
)
@profiler.trace
def
list_targets_by_instance
(
self
,
instance_id
,
target_list
=
None
):
"""Returns a list of FloatingIpTarget objects of FIP association.
...
...
@@ -771,7 +769,7 @@ def neutronclient(request):
return
c
@profiler.trace
def
list_resources_with_long_filters
(
list_method
,
filter_attr
,
filter_values
,
**
params
):
"""List neutron resources with handling RequestURITooLong exception.
...
...
@@ -826,21 +824,21 @@ def list_resources_with_long_filters(list_method,
return
resources
@profiler.trace
def
trunk_show
(
request
,
trunk_id
):
LOG
.
debug
(
"trunk_show(): trunk_id=
%
s"
,
trunk_id
)
trunk
=
neutronclient
(
request
)
.
show_trunk
(
trunk_id
)
.
get
(
'trunk'
)
return
Trunk
(
trunk
)
@profiler.trace
def
trunk_list
(
request
,
**
params
):
LOG
.
debug
(
"trunk_list(): params=
%
s"
,
params
)
trunks
=
neutronclient
(
request
)
.
list_trunks
(
**
params
)
.
get
(
'trunks'
)
return
[
Trunk
(
t
)
for
t
in
trunks
]
@profiler.trace
def
trunk_create
(
request
,
**
params
):
LOG
.
debug
(
"trunk_create(): params=
%
s"
,
params
)
if
'project_id'
not
in
params
:
...
...
@@ -850,7 +848,7 @@ def trunk_create(request, **params):
return
Trunk
(
trunk
)
@profiler.trace
def
trunk_delete
(
request
,
trunk_id
):
LOG
.
debug
(
"trunk_delete(): trunk_id=
%
s"
,
trunk_id
)
neutronclient
(
request
)
.
delete_trunk
(
trunk_id
)
...
...
@@ -871,7 +869,7 @@ def _prepare_body_add_subports(subports):
return
{
'sub_ports'
:
subports
}
@profiler.trace
def
trunk_update
(
request
,
trunk_id
,
old_trunk
,
new_trunk
):
"""Handle update to a trunk in (at most) three neutron calls.
...
...
@@ -960,7 +958,7 @@ def trunk_update(request, trunk_id, old_trunk, new_trunk):
return
Trunk
(
trunk
)
@profiler.trace
def
network_list
(
request
,
**
params
):
LOG
.
debug
(
"network_list(): params=
%
s"
,
params
)
networks
=
neutronclient
(
request
)
.
list_networks
(
**
params
)
.
get
(
'networks'
)
...
...
@@ -976,7 +974,7 @@ def network_list(request, **params):
return
[
Network
(
n
)
for
n
in
networks
]
@profiler.trace
def
network_list_for_tenant
(
request
,
tenant_id
,
include_external
=
False
,
**
params
):
"""Return a network list available for the tenant.
...
...
@@ -1019,7 +1017,7 @@ def network_list_for_tenant(request, tenant_id, include_external=False,
return
networks
@profiler.trace
def
network_get
(
request
,
network_id
,
expand_subnet
=
True
,
**
params
):
LOG
.
debug
(
"network_get(): netid=
%(network_id)
s, params=
%(params)
s"
,
{
'network_id'
:
network_id
,
'params'
:
params
})
...
...
@@ -1046,7 +1044,7 @@ def network_get(request, network_id, expand_subnet=True, **params):
return
Network
(
network
)
@profiler.trace
def
network_create
(
request
,
**
kwargs
):
"""Create a network object.
...
...
@@ -1063,7 +1061,7 @@ def network_create(request, **kwargs):
return
Network
(
network
)
@profiler.trace
def
network_update
(
request
,
network_id
,
**
kwargs
):
LOG
.
debug
(
"network_update(): netid=
%(network_id)
s, params=
%(params)
s"
,
{
'network_id'
:
network_id
,
'params'
:
kwargs
})
...
...
@@ -1073,13 +1071,13 @@ def network_update(request, network_id, **kwargs):
return
Network
(
network
)
@profiler.trace
def
network_delete
(
request
,
network_id
):
LOG
.
debug
(
"network_delete(): netid=
%
s"
,
network_id
)
neutronclient
(
request
)
.
delete_network
(
network_id
)
@profiler.trace
@memoized
def
subnet_list
(
request
,
**
params
):
LOG
.
debug
(
"subnet_list(): params=
%
s"
,
params
)
...
...
@@ -1087,7 +1085,7 @@ def subnet_list(request, **params):
return
[
Subnet
(
s
)
for
s
in
subnets
]
@profiler.trace
def
subnet_get
(
request
,
subnet_id
,
**
params
):
LOG
.
debug
(
"subnet_get(): subnetid=
%(subnet_id)
s, params=
%(params)
s"
,
{
'subnet_id'
:
subnet_id
,
'params'
:
params
})
...
...
@@ -1096,7 +1094,7 @@ def subnet_get(request, subnet_id, **params):
return
Subnet
(
subnet
)
@profiler.trace
def
subnet_create
(
request
,
network_id
,
**
kwargs
):
"""Create a subnet on a specified network.
...
...
@@ -1125,7 +1123,7 @@ def subnet_create(request, network_id, **kwargs):
return
Subnet
(
subnet
)
@profiler.trace
def
subnet_update
(
request
,
subnet_id
,
**
kwargs
):
LOG
.
debug
(
"subnet_update(): subnetid=
%(subnet_id)
s, kwargs=
%(kwargs)
s"
,
{
'subnet_id'
:
subnet_id
,
'kwargs'
:
kwargs
})
...
...
@@ -1135,13 +1133,13 @@ def subnet_update(request, subnet_id, **kwargs):
return
Subnet
(
subnet
)
@profiler.trace
def
subnet_delete
(
request
,
subnet_id
):
LOG
.
debug
(
"subnet_delete(): subnetid=
%
s"
,
subnet_id
)
neutronclient
(
request
)
.
delete_subnet
(
subnet_id
)
@profiler.trace
def
subnetpool_list
(
request
,
**
params
):
LOG
.
debug
(
"subnetpool_list(): params=
%
s"
,
params
)
subnetpools
=
\
...
...
@@ -1149,7 +1147,7 @@ def subnetpool_list(request, **params):
return
[
SubnetPool
(
s
)
for
s
in
subnetpools
]
@profiler.trace
def
subnetpool_get
(
request
,
subnetpool_id
,
**
params
):
LOG
.
debug
(
"subnetpool_get(): subnetpoolid=
%(subnetpool_id)
s, "
"params=
%(params)
s"
,
{
'subnetpool_id'
:
subnetpool_id
,
...
...
@@ -1160,7 +1158,7 @@ def subnetpool_get(request, subnetpool_id, **params):
return
SubnetPool
(
subnetpool
)
@profiler.trace
def
subnetpool_create
(
request
,
name
,
prefixes
,
**
kwargs
):
"""Create a subnetpool.
...
...
@@ -1198,7 +1196,7 @@ def subnetpool_create(request, name, prefixes, **kwargs):
return
SubnetPool
(
subnetpool
)
@profiler.trace
def
subnetpool_update
(
request
,
subnetpool_id
,
**
kwargs
):
LOG
.
debug
(
"subnetpool_update(): subnetpoolid=
%(subnetpool_id)
s, "
"kwargs=
%(kwargs)
s"
,
{
'subnetpool_id'
:
subnetpool_id
,
...
...
@@ -1210,13 +1208,13 @@ def subnetpool_update(request, subnetpool_id, **kwargs):
return
SubnetPool
(
subnetpool
)
@profiler.trace
def
subnetpool_delete
(
request
,
subnetpool_id
):
LOG
.
debug
(
"subnetpool_delete(): subnetpoolid=
%
s"
,
subnetpool_id
)
return
neutronclient
(
request
)
.
delete_subnetpool
(
subnetpool_id
)
@profiler.trace
@memoized
def
port_list
(
request
,
**
params
):
LOG
.
debug
(
"port_list(): params=
%
s"
,
params
)
...
...
@@ -1224,7 +1222,7 @@ def port_list(request, **params):
return
[
Port
(
p
)
for
p
in
ports
]
@profiler.trace
@memoized
def
port_list_with_trunk_types
(
request
,
**
params
):
"""List neutron Ports for this tenant with possible TrunkPort indicated
...
...
@@ -1269,7 +1267,7 @@ def port_list_with_trunk_types(request, **params):
return
[
_get_port_info
(
p
)
for
p
in
ports
]
@profiler.trace
def
port_get
(
request
,
port_id
,
**
params
):
LOG
.
debug
(
"port_get(): portid=
%(port_id)
s, params=
%(params)
s"
,
{
'port_id'
:
port_id
,
'params'
:
params
})
...
...
@@ -1284,7 +1282,7 @@ def unescape_port_kwargs(**kwargs):
return
kwargs
@profiler.trace
def
port_create
(
request
,
network_id
,
**
kwargs
):
"""Create a port on a specified network.
...
...
@@ -1306,13 +1304,13 @@ def port_create(request, network_id, **kwargs):
return
Port
(
port
)
@profiler.trace
def
port_delete
(
request
,
port_id
):
LOG
.
debug
(
"port_delete(): portid=
%
s"
,
port_id
)
neutronclient
(
request
)
.
delete_port
(
port_id
)
@profiler.trace
def
port_update
(
request
,
port_id
,
**
kwargs
):
LOG
.
debug
(
"port_update(): portid=
%(port_id)
s, kwargs=
%(kwargs)
s"
,
{
'port_id'
:
port_id
,
'kwargs'
:
kwargs
})
...
...
@@ -1322,7 +1320,7 @@ def port_update(request, port_id, **kwargs):
return
Port
(
port
)
@profiler.trace
def
router_create
(
request
,
**
kwargs
):
LOG
.
debug
(
"router_create():, kwargs=
%
s"
,
kwargs
)
body
=
{
'router'
:
{}}
...
...
@@ -1333,7 +1331,7 @@ def router_create(request, **kwargs):
return
Router
(
router
)
@profiler.trace
def
router_update
(
request
,
r_id
,
**
kwargs
):
LOG
.
debug
(
"router_update(): router_id=
%(r_id)
s, kwargs=
%(kwargs)
s"
,
{
'r_id'
:
r_id
,
'kwargs'
:
kwargs
})
...
...
@@ -1343,20 +1341,20 @@ def router_update(request, r_id, **kwargs):
return
Router
(
router
[
'router'
])
@profiler.trace
def
router_get
(
request
,
router_id
,
**
params
):
router
=
neutronclient
(
request
)
.
show_router
(
router_id
,
**
params
)
.
get
(
'router'
)
return
Router
(
router
)
@profiler.trace
def
router_list
(
request
,
**
params
):
routers
=
neutronclient
(
request
)
.
list_routers
(
**
params
)
.
get
(
'routers'
)
return
[
Router
(
r
)
for
r
in
routers
]
@profiler.trace
def
router_list_on_l3_agent
(
request
,
l3_agent_id
,
**
params
):
routers
=
neutronclient
(
request
)
.
\
list_routers_on_l3_agent
(
l3_agent_id
,
...
...
@@ -1364,12 +1362,12 @@ def router_list_on_l3_agent(request, l3_agent_id, **params):
return
[
Router
(
r
)
for
r
in
routers
]
@profiler.trace
def
router_delete
(
request
,
router_id
):
neutronclient
(
request
)
.
delete_router
(
router_id
)
@profiler.trace
def
router_add_interface
(
request
,
router_id
,
subnet_id
=
None
,
port_id
=
None
):
body
=
{}
if
subnet_id
:
...
...
@@ -1380,7 +1378,7 @@ def router_add_interface(request, router_id, subnet_id=None, port_id=None):
return
client
.
add_interface_router
(
router_id
,
body
)
@profiler.trace
def
router_remove_interface
(
request
,
router_id
,
subnet_id
=
None
,
port_id
=
None
):
body
=
{}
if
subnet_id
:
...
...
@@ -1390,7 +1388,7 @@ def router_remove_interface(request, router_id, subnet_id=None, port_id=None):
neutronclient
(
request
)
.
remove_interface_router
(
router_id
,
body
)
@profiler.trace
def
router_add_gateway
(
request
,
router_id
,
network_id
,
enable_snat
=
None
):
body
=
{
'network_id'
:
network_id
}
if
enable_snat
is
not
None
:
...
...
@@ -1398,12 +1396,12 @@ def router_add_gateway(request, router_id, network_id, enable_snat=None):
neutronclient
(
request
)
.
add_gateway_router
(
router_id
,
body
)
@profiler.trace
def
router_remove_gateway
(
request
,
router_id
):
neutronclient
(
request
)
.
remove_gateway_router
(
router_id
)
@profiler.trace
def
router_static_route_list
(
request
,
router_id
=
None
):
router
=
router_get
(
request
,
router_id
)
try
:
...
...
@@ -1416,7 +1414,7 @@ def router_static_route_list(request, router_id=None):
return
routes
@profiler.trace
def
router_static_route_remove
(
request
,
router_id
,
route_ids
):
currentroutes
=
router_static_route_list
(
request
,
router_id
=
router_id
)
newroutes
=
[]
...
...
@@ -1429,7 +1427,7 @@ def router_static_route_remove(request, router_id, route_ids):
return
new
@profiler.trace
def
router_static_route_add
(
request
,
router_id
,
newroute
):
body
=
{}
currentroutes
=
router_static_route_list
(
request
,
router_id
=
router_id
)
...
...
@@ -1440,71 +1438,71 @@ def router_static_route_add(request, router_id, newroute):
return
new
@profiler.trace
def
tenant_quota_get
(
request
,
tenant_id
):
return
base
.
QuotaSet
(
neutronclient
(
request
)
.
show_quota
(
tenant_id
)[
'quota'
])
@profiler.trace
def
tenant_quota_update
(
request
,
tenant_id
,
**
kwargs
):
quotas
=
{
'quota'
:
kwargs
}
return
neutronclient
(
request
)
.
update_quota
(
tenant_id
,
quotas
)
@profiler.trace
def
tenant_quota_detail_get
(
request
,
tenant_id
=
None
):
tenant_id
=
tenant_id
or
request
.
user
.
tenant_id
response
=
neutronclient
(
request
)
.
get
(
'/quotas/
%
s/details'
%
tenant_id
)
return
response
[
'quota'
]
@profiler.trace
def
default_quota_get
(
request
,
tenant_id
=
None
):
tenant_id
=
tenant_id
or
request
.
user
.
tenant_id
response
=
neutronclient
(
request
)
.
show_quota_default
(
tenant_id
)
return
base
.
QuotaSet
(
response
[
'quota'
])
@profiler.trace
def
agent_list
(
request
,
**
params
):
agents
=
neutronclient
(
request
)
.
list_agents
(
**
params
)
return
[
Agent
(
a
)
for
a
in
agents
[
'agents'
]]
@profiler.trace
def
list_dhcp_agent_hosting_networks
(
request
,
network
,
**
params
):
agents
=
neutronclient
(
request
)
.
list_dhcp_agent_hosting_networks
(
network
,
**
params
)
return
[
Agent
(
a
)
for
a
in
agents
[
'agents'
]]
@profiler.trace
def
list_l3_agent_hosting_router
(
request
,
router
,
**
params
):
agents
=
neutronclient
(
request
)
.
list_l3_agent_hosting_routers
(
router
,
**
params
)
return
[
Agent
(
a
)
for
a
in
agents
[
'agents'
]]
@profiler.trace
def
show_network_ip_availability
(
request
,
network_id
):
ip_availability
=
neutronclient
(
request
)
.
show_network_ip_availability
(
network_id
)
return
ip_availability
@profiler.trace
def
add_network_to_dhcp_agent
(
request
,
dhcp_agent
,
network_id
):
body
=
{
'network_id'
:
network_id
}
return
neutronclient
(
request
)
.
add_network_to_dhcp_agent
(
dhcp_agent
,
body
)
@profiler.trace
def
remove_network_from_dhcp_agent
(
request
,
dhcp_agent
,
network_id
):
return
neutronclient
(
request
)
.
remove_network_from_dhcp_agent
(
dhcp_agent
,
network_id
)
@profiler.trace
def
provider_list
(
request
):
providers
=
neutronclient
(
request
)
.
list_service_providers
()
return
providers
[
'service_providers'
]
...
...
@@ -1603,7 +1601,7 @@ def server_update_security_groups(request, instance_id,
# TODO(pkarikh) need to uncomment when osprofiler will have no
# issues with unicode in:
# openstack_dashboard/test/test_data/nova_data.py#L470 data
#
@profiler.trace
#
def
servers_update_addresses
(
request
,
servers
,
all_tenants
=
False
):
"""Retrieve servers networking information from Neutron if enabled.
...
...
@@ -1703,7 +1701,7 @@ def _server_get_addresses(request, server, ports, floating_ips, network_names):
return
dict
(
addresses
)
@profiler.trace
@memoized
def
list_extensions
(
request
):
try
:
...
...
@@ -1716,7 +1714,7 @@ def list_extensions(request):
return
()
@profiler.trace
@memoized
def
is_extension_supported
(
request
,
extension_alias
):
extensions
=
list_extensions
(
request
)
...
...
@@ -1872,7 +1870,7 @@ def policy_list(request, **kwargs):
return
[
QoSPolicy
(
p
)
for
p
in
policies
]
@profiler.trace
def
policy_get
(
request
,
policy_id
,
**
kwargs
):
"""Get QoS policy for a given policy id."""
policy
=
neutronclient
(
request
)
.
show_qos_policy
(
...
...
@@ -1880,7 +1878,7 @@ def policy_get(request, policy_id, **kwargs):
return
QoSPolicy
(
policy
)
@profiler.trace
def
list_availability_zones
(
request
,
resource
=
None
,
state
=
None
):
az_list
=
neutronclient
(
request
)
.
list_availability_zones
()
.
get
(
'availability_zones'
)
...
...
circle/openstack_api/nova.py
View file @
327e7892
...
...
@@ -506,16 +506,16 @@ def keypair_get(request, name):
def
server_create
(
request
,
name
,
image
,
flavor
,
key_name
,
user_data
,
security_groups
,
block_device_mapping
=
None
,
block_device_mapping_v2
=
None
,
nics
=
None
,
def
server_create
(
request
,
name
,
image
,
flavor
,
key_name
=
None
,
user_data
=
None
,
security_groups
=
None
,
block_device_mapping
=
None
,
block_device_mapping_v2
=
None
,
nics
=
"auto"
,
availability_zone
=
None
,
instance_count
=
1
,
admin_pass
=
None
,
disk_config
=
None
,
config_drive
=
None
,
meta
=
None
,
scheduler_hints
=
None
,
description
=
None
):
kwargs
=
{}
if
description
is
not
None
:
kwargs
[
'description'
]
=
description
return
Instance
Server
(
get_novaclient_with_instance_desc
(
request
)
.
servers
.
create
(
return
Server
(
get_novaclient_with_instance_desc
(
request
)
.
servers
.
create
(
name
.
strip
(),
image
,
flavor
,
userdata
=
user_data
,
security_groups
=
security_groups
,
key_name
=
key_name
,
block_device_mapping
=
block_device_mapping
,
...
...
circle/openstack_api/policy.py
0 → 100644
View file @
327e7892
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from
openstack_api.utils
import
settings
as
utils_settings
def
check
(
actions
,
request
,
target
=
None
):
"""Wrapper of the configurable policy method."""
policy_check
=
utils_settings
.
import_setting
(
"POLICY_CHECK_FUNCTION"
)
if
policy_check
:
return
policy_check
(
actions
,
request
,
target
)
return
True
class
PolicyTargetMixin
(
object
):
"""Mixin that adds the get_policy_target function
policy_target_attrs - a tuple of tuples which defines
the relationship between attributes in the policy
target dict and attributes in the passed datum object.
policy_target_attrs can be overwritten by sub-classes
which do not use the default, so they can neatly define
their policy target information, without overriding the
entire get_policy_target function.
"""
policy_target_attrs
=
((
"project_id"
,
"tenant_id"
),
(
"tenant_id"
,
"tenant_id"
),
(
"user_id"
,
"user_id"
),
(
"domain_id"
,
"domain_id"
),
(
"target.project.domain_id"
,
"domain_id"
),
(
"target.user.domain_id"
,
"domain_id"
),
(
"target.group.domain_id"
,
"domain_id"
))
def
get_policy_target
(
self
,
request
,
datum
=
None
):
policy_target
=
{}
for
policy_attr
,
datum_attr
in
self
.
policy_target_attrs
:
if
datum
:
policy_target
[
policy_attr
]
=
getattr
(
datum
,
datum_attr
,
None
)
else
:
policy_target
[
policy_attr
]
=
None
return
policy_target
circle/request/urls.py
View file @
327e7892
...
...
@@ -29,7 +29,7 @@ from .views import (
urlpatterns
=
[
url
(
r'^list/$'
,
RequestList
.
as_view
(),
name
=
"request.views.request-list"
),
url
(
r'^(?P<pk>
\d+
)/$'
,
RequestDetail
.
as_view
(),
url
(
r'^(?P<pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/$'
,
RequestDetail
.
as_view
(),
name
=
"request.views.request-detail"
),
url
(
r'^type/list/$'
,
RequestTypeList
.
as_view
(),
...
...
@@ -55,10 +55,10 @@ urlpatterns = [
# request views (visible for users)
url
(
r'template/$'
,
TemplateRequestView
.
as_view
(),
name
=
"request.views.request-template"
),
url
(
r'lease/(?P<vm_pk>
\d+
)/$'
,
LeaseRequestView
.
as_view
(),
url
(
r'lease/(?P<vm_pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/$'
,
LeaseRequestView
.
as_view
(),
name
=
"request.views.request-lease"
),
url
(
r'resource/(?P<vm_pk>
\d+
)/$'
,
ResourceRequestView
.
as_view
(),
url
(
r'resource/(?P<vm_pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/$'
,
ResourceRequestView
.
as_view
(),
name
=
"request.views.request-resource"
),
url
(
r'resize/(?P<vm_pk>
\d+)/(?P<disk_pk>\d+
)/$'
,
url
(
r'resize/(?P<vm_pk>
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/(?P<disk_pk>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
)/$'
,
ResizeRequestView
.
as_view
(),
name
=
"request.views.request-resize"
),
]
circle/vm/models/instance.py
View file @
327e7892
...
...
@@ -305,6 +305,10 @@ class Instance(OperatedMixin, TimeStampedModel):
return
" "
.
join
(
s
for
s
in
parts
if
s
!=
""
)
@property
def
pk
(
self
):
return
self
.
os_server_id
@property
def
name
(
self
):
return
self
.
_os_server
.
name
...
...
@@ -470,7 +474,7 @@ class Instance(OperatedMixin, TimeStampedModel):
@permalink
def
get_absolute_url
(
self
):
return
(
'dashboard.views.detail'
,
None
,
{
'pk'
:
self
.
id
})
return
(
'dashboard.views.detail'
,
None
,
{
'pk'
:
self
.
os_server_
id
})
@property
def
vm_name
(
self
):
...
...
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