Commit 269c4015 by Szabolcs Gelencser

Set template image as shared by default. Do not show shared images in plain vm creation

parent e155a219
......@@ -3,12 +3,9 @@
<component name="ChangeListManager">
<list default="true" id="1fbec8af-5a7c-40f9-b994-83ac07d1ae1d" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json" afterPath="$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json" />
<change beforePath="$PROJECT_DIR$/circle/circle/db.sqlite3" afterPath="$PROJECT_DIR$/circle/circle/db.sqlite3" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/forms.py" afterPath="$PROJECT_DIR$/circle/dashboard/forms.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/urls.py" afterPath="$PROJECT_DIR$/circle/dashboard/urls.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/views/template.py" afterPath="$PROJECT_DIR$/circle/dashboard/views/template.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/views/util.py" afterPath="$PROJECT_DIR$/circle/dashboard/views/util.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/operations.py" afterPath="$PROJECT_DIR$/circle/vm/operations.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -37,84 +34,21 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="template.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/template.py">
<file leaf-file-name="operations.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="405">
<caret line="485" column="37" lean-forward="false" selection-start-line="485" selection-start-column="37" selection-end-line="485" selection-end-column="37" />
<folding>
<element signature="e#731#787#0" expanded="true" />
<marker date="1521452159522" expanded="true" signature="10052:10265" ph="SELECT count... vm_instance" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="template-edit.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="107" column="81" lean-forward="false" selection-start-line="107" selection-start-column="66" selection-end-line="107" selection-end-column="81" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="glance_policy.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/glance_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="21" lean-forward="true" selection-start-line="20" selection-start-column="21" selection-end-line="20" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="nova_policy.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="379" column="25" lean-forward="false" selection-start-line="379" selection-start-column="20" selection-end-line="379" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="circle_policy.json" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="27" lean-forward="false" selection-start-line="3" selection-start-column="27" selection-end-line="3" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="urls.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="42" column="43" lean-forward="false" selection-start-line="42" selection-start-column="43" selection-end-line="42" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="vm.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="131">
<caret line="99" column="8" lean-forward="true" selection-start-line="99" selection-start-column="8" selection-end-line="99" selection-end-column="8" />
<state relative-caret-position="448">
<caret line="523" column="0" lean-forward="true" selection-start-line="523" selection-start-column="0" selection-end-line="523" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="util.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<file leaf-file-name="glance.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/glance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="602" column="0" lean-forward="true" selection-start-line="602" selection-start-column="0" selection-end-line="602" selection-end-column="0" />
<state relative-caret-position="143">
<caret line="479" column="51" lean-forward="false" selection-start-line="479" selection-start-column="51" selection-end-line="479" selection-end-column="51" />
<folding />
</state>
</provider>
......@@ -132,8 +66,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>vmdetail</find>
<find>policy</find>
<find>vm_ops</find>
<find>VmSaveView</find>
<find>saveaste</find>
......@@ -159,9 +91,11 @@
<find>TransferOwnershipView</find>
<find>context_is_admin</find>
<find>service</find>
<find>template-access</find>
<find>get_</find>
<find>image</find>
<find>template-access</find>
<find>images</find>
<find>update</find>
</findStrings>
<replaceStrings>
<replace>'ACTIVE'</replace>
......@@ -216,20 +150,20 @@
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
<option value="$PROJECT_DIR$/circle/openstack_api/nova.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/dashboard/templates/dashboard/index-templates.html" />
<option value="$PROJECT_DIR$/circle/dashboard/views/index.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/vm.py" />
<option value="$PROJECT_DIR$/circle/vm/models/instance.py" />
<option value="$PROJECT_DIR$/circle/dashboard/forms.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html" />
<option value="$PROJECT_DIR$/circle/dashboard/views/util.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/template.py" />
<option value="$PROJECT_DIR$/circle/dashboard/urls.py" />
<option value="$PROJECT_DIR$/circle/circle/os_policies/glance_policy.json" />
<option value="$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json" />
<option value="$PROJECT_DIR$/circle/dashboard/forms.py" />
<option value="$PROJECT_DIR$/circle/vm/operations.py" />
</list>
</option>
</component>
......@@ -294,35 +228,6 @@
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="os_policies" type="462c0819:PsiDirectoryNode" />
</path>
<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" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="requirements" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
......@@ -337,7 +242,7 @@
<property name="settings.editor.selected.configurable" value="watcher.settings" />
<property name="NewWatcherDialog.advanced.open" value="true" />
<property name="DefaultHtmlFileTemplate" value="HTML File" />
<property name="SearchEverywhereHistoryKey" value="vmdeta&#9;null&#9;null&#10;templatedet&#9;null&#9;null&#10;instancetemp&#9;null&#9;null&#10;instancetem&#9;null&#9;null&#10;url&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;vmcreate&#9;null&#9;null&#10;index&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/index.py&#10;base&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;opera&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;operations&#9;FILE&#9;file:///home/h3yduck/cloud/circle/common/operations.py&#10;templat&#9;null&#9;null&#10;vmadd&#9;null&#9;null&#10;vmdetail&#9;null&#9;null&#10;addinterfa&#9;null&#9;null&#10;addin&#9;null&#9;null&#10;server&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;instance&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;operat&#9;null&#9;null&#10;ins&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;vmdetai&#9;null&#9;null&#10;operationvi&#9;null&#9;null&#10;ser&#9;null&#9;null&#10;server.&#9;FILE&#9;file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py&#10;resources.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html&#10;vm-de&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html&#10;vxla&#9;null&#9;null&#10;urls&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;index-v&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html&#10;index-vm&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;create&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html&#10;vxl&#9;null&#9;null&#10;nov&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_api/nova.py&#10;nova.p&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_api/nova.py&#10;vmdetailv&#9;null&#9;null&#10;editor&#9;null&#9;null&#10;networktopo&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js&#10;bow&#9;FILE&#9;file:///home/h3yduck/cloud/circle/bower.json&#10;base.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;local&#9;null&#9;null&#10;vnc&#9;null&#9;null&#10;plain&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html&#10;forms&#9;null&#9;null&#10;vxlanform&#9;null&#9;null&#10;instanc&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;index-vxla&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html&#10;_vm-c&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/_vm-create-1.html&#10;vmcrea&#9;null&#9;null&#10;loginV&#9;null&#9;null&#10;index.html&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html" />
<property name="SearchEverywhereHistoryKey" value="save&#9;null&#9;null&#10;plainc&#9;null&#9;null&#10;vmdeta&#9;null&#9;null&#10;templatedet&#9;null&#9;null&#10;instancetemp&#9;null&#9;null&#10;instancetem&#9;null&#9;null&#10;url&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;vmcreate&#9;null&#9;null&#10;index&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/index.py&#10;base&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;opera&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;operations&#9;FILE&#9;file:///home/h3yduck/cloud/circle/common/operations.py&#10;templat&#9;null&#9;null&#10;vmadd&#9;null&#9;null&#10;vmdetail&#9;null&#9;null&#10;addinterfa&#9;null&#9;null&#10;addin&#9;null&#9;null&#10;server&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;instance&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;operat&#9;null&#9;null&#10;ins&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;vmdetai&#9;null&#9;null&#10;operationvi&#9;null&#9;null&#10;ser&#9;null&#9;null&#10;server.&#9;FILE&#9;file:///home/h3yduck/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py&#10;resources.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/request/templates/request/initials/resources.html&#10;vm-de&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html&#10;vxla&#9;null&#9;null&#10;urls&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;index-v&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html&#10;index-vm&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;create&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html&#10;vxl&#9;null&#9;null&#10;nov&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_api/nova.py&#10;nova.p&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_api/nova.py&#10;vmdetailv&#9;null&#9;null&#10;editor&#9;null&#9;null&#10;networktopo&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/static/js/horizon.networktopology.js&#10;bow&#9;FILE&#9;file:///home/h3yduck/cloud/circle/bower.json&#10;base.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;local&#9;null&#9;null&#10;vnc&#9;null&#9;null&#10;plain&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-plain-image-create.html&#10;forms&#9;null&#9;null&#10;vxlanform&#9;null&#9;null&#10;instanc&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;index-vxla&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vxlans.html&#10;_vm-c&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/_vm-create-1.html&#10;vmcrea&#9;null&#9;null" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
......@@ -467,7 +372,7 @@
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.514377" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.43023255" sideWeight="0.43610224" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.49574015" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23150106" sideWeight="0.49201277" 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.23150106" sideWeight="0.49201277" 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.1682641" 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" />
......@@ -559,7 +464,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option name="time" value="236" />
<option name="time" value="239" />
</breakpoint-manager>
<watches-manager />
</component>
......@@ -604,60 +509,53 @@
</expressions>
<expressions id="evaluateExpression">
<expression>
<expression-string>self.request.user</expression-string>
<expression-string>openstack_api.glance.image_update(request, template_image_id, visibility=&quot;shared&quot;)</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>instances</expression-string>
<expression-string>images[0]._apiresource[&quot;visibility&quot;]</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>self.instance</expression-string>
<expression-string>images[0]._apiresource</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>type(self) == SaveAsTemplateOperation</expression-string>
<expression-string>images[0]</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>type(self) == DeployOperation</expression-string>
<expression-string>images[0].visiblility</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>type(self)</expression-string>
<expression-string>images[0][&quot;visiblility&quot;]</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>ports</expression-string>
<expression-string>images[&quot;visiblility&quot;]</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>openstack_api.neutron.router_list(self.request)</expression-string>
<expression-string>images</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>openstack_api.neutron.port_list(self.request)</expression-string>
<expression-string>self.request.user</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
</expressions>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vxlans.html">
<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>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/model_utils/choices.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="476">
......@@ -862,13 +760,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="550">
<caret line="535" column="65" lean-forward="true" selection-start-line="535" selection-start-column="65" selection-end-line="535" selection-end-column="65" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/index.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
......@@ -911,13 +802,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="310" column="0" lean-forward="false" selection-start-line="310" selection-start-column="0" selection-end-line="310" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="575">
......@@ -932,14 +816,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/forms.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="537" column="9" lean-forward="true" selection-start-line="537" selection-start-column="9" selection-end-line="537" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/edit.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="716">
......@@ -951,7 +827,7 @@
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="602" column="0" lean-forward="true" selection-start-line="602" selection-start-column="0" selection-end-line="602" selection-end-column="0" />
<caret line="602" column="0" lean-forward="false" selection-start-line="602" selection-start-column="0" selection-end-line="602" selection-end-column="0" />
<folding />
</state>
</provider>
......@@ -964,10 +840,42 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/keystone_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="131">
<caret line="99" column="8" lean-forward="true" selection-start-line="99" selection-start-column="8" selection-end-line="99" selection-end-column="8" />
<state relative-caret-position="187">
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="1" lean-forward="true" selection-start-line="4" selection-start-column="1" selection-end-line="4" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="379" column="25" lean-forward="false" selection-start-line="379" selection-start-column="20" selection-end-line="379" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/glance_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="21" lean-forward="false" selection-start-line="20" selection-start-column="21" selection-end-line="20" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="107" column="81" lean-forward="false" selection-start-line="107" selection-start-column="66" selection-end-line="107" selection-end-column="81" />
<folding />
</state>
</provider>
......@@ -977,48 +885,48 @@
<state relative-caret-position="405">
<caret line="485" column="37" lean-forward="false" selection-start-line="485" selection-start-column="37" selection-end-line="485" selection-end-column="37" />
<folding>
<element signature="e#731#787#0" expanded="true" />
<element signature="e#731#787#0" expanded="false" />
<marker date="1521452159522" expanded="true" signature="10052:10265" ph="SELECT count... vm_instance" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/keystone_policy.json">
<entry file="file://$PROJECT_DIR$/circle/dashboard/forms.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<state relative-caret-position="437">
<caret line="140" column="40" lean-forward="true" selection-start-line="140" selection-start-column="40" selection-end-line="140" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-edit.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="107" column="81" lean-forward="false" selection-start-line="107" selection-start-column="66" selection-end-line="107" selection-end-column="81" />
<state relative-caret-position="301">
<caret line="1045" column="40" lean-forward="false" selection-start-line="1045" selection-start-column="20" selection-end-line="1045" selection-end-column="40" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="379" column="25" lean-forward="false" selection-start-line="379" selection-start-column="20" selection-end-line="379" selection-end-column="25" />
<state relative-caret-position="306">
<caret line="481" column="4" lean-forward="false" selection-start-line="481" selection-start-column="4" selection-end-line="481" selection-end-column="4" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/glance_policy.json">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/glance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="21" lean-forward="true" selection-start-line="20" selection-start-column="21" selection-end-line="20" selection-end-column="21" />
<state relative-caret-position="143">
<caret line="479" column="51" lean-forward="false" selection-start-line="479" selection-start-column="51" selection-end-line="479" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json">
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="27" lean-forward="false" selection-start-line="3" selection-start-column="27" selection-end-line="3" selection-end-column="27" />
<state relative-caret-position="448">
<caret line="523" column="0" lean-forward="true" selection-start-line="523" selection-start-column="0" selection-end-line="523" selection-end-column="0" />
<folding />
</state>
</provider>
......
No preview for this file type
......@@ -130,6 +130,8 @@ class VmFromPlainImageForm(forms.Form):
super(VmFromPlainImageForm, self).__init__(*args, **kwargs)
images = openstack_api.glance.image_list_detailed(request)[0] #TODO: flatten?
images = [i for i in images if i._apiresource["visibility"] in ["private", "public"]]
def sizeof_fmt(num, suffix='B'):
for unit in ['', 'K', 'M', 'G', 'T']:
if abs(num) < 1024.0:
......
......@@ -523,6 +523,7 @@ class SaveAsTemplateOperation(InstanceOperation):
with_shutdown=True, clone=False, task=None, **kwargs):
template_image_id = openstack_api.nova.snapshot_create(request, self.instance.id, name)
openstack_api.glance.image_update(request, template_image_id, visibility="shared")
template = InstanceTemplate(
name=name,
image_id=template_image_id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment