Commit ba26b3e5 by Szabolcs Gelencser

Remove Instance model from current state, use nova.Server instead

parent ef0ed6be
......@@ -2,9 +2,19 @@
<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/templatetags/instance_tags.py" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
<change beforePath="$PROJECT_DIR$/circle/common/operations.py" afterPath="$PROJECT_DIR$/circle/common/operations.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html" />
<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/models.py" afterPath="$PROJECT_DIR$/circle/network/models.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/models/instance.py" afterPath="$PROJECT_DIR$/circle/vm/models/instance.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" />
......@@ -31,11 +41,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="network.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html">
<file leaf-file-name="util.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="20" lean-forward="false" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
<state relative-caret-position="311">
<caret line="334" column="41" lean-forward="false" selection-start-line="334" selection-start-column="41" selection-end-line="334" selection-end-column="41" />
<folding />
</state>
</provider>
......@@ -44,26 +54,47 @@
<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="207">
<caret line="341" column="31" lean-forward="false" selection-start-line="341" selection-start-column="31" selection-end-line="341" selection-end-column="31" />
<state relative-caret-position="175">
<caret line="1270" column="0" lean-forward="false" selection-start-line="1270" selection-start-column="0" selection-end-line="1270" selection-end-column="0" />
<folding>
<element signature="e#731#787#0" expanded="true" />
<element signature="e#40423#41594#0" expanded="false" />
<element signature="e#40629#41800#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="operations.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<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="-2636">
<caret line="58" column="36" lean-forward="true" selection-start-line="58" selection-start-column="14" selection-end-line="58" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="instance.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/vm/models/instance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="207">
<caret line="184" column="39" lean-forward="false" selection-start-line="184" selection-start-column="39" selection-end-line="184" selection-end-column="39" />
<state relative-caret-position="109">
<caret line="446" column="43" lean-forward="false" selection-start-line="446" selection-start-column="43" selection-end-line="446" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="operations.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="245">
<caret line="648" column="76" lean-forward="true" selection-start-line="648" selection-start-column="76" selection-end-line="648" selection-end-column="76" />
<folding>
<element signature="e#732#788#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
......@@ -76,25 +107,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>jstemplate</find>
<find>tag</find>
<find>editor.</find>
<find>editorvi</find>
<find>balloon</find>
<find>trans</find>
<find>profile-prefe</find>
<find>deleteviewb</find>
<find>jspl</find>
<find>vm-create</find>
<find>jsi18n</find>
<find>as_cris</find>
<find>moresub</find>
<find>VxlanFo</find>
<find>interfa</find>
<find>server_c</find>
<find>create</find>
<find>server_cr</find>
<find>server_create</find>
<find>vmaddin</find>
<find>vmaddinter</find>
<find>VmAddInterfaceForm</find>
......@@ -106,6 +118,25 @@
<find>polic</find>
<find>addinterfa</find>
<find>interface</find>
<find>os_</find>
<find>instanceoper</find>
<find>Vxlan.list</find>
<find>instanceoperat</find>
<find>operatedmixin</find>
<find>dashboard.views.vm-activity-list</find>
<find>op.get</find>
<find>request.views.request-resource</find>
<find>get_status_icon</find>
<find>icon</find>
<find>_(</find>
<find>system</find>
<find>instan</find>
<find>monkey</find>
<find>_os_server</find>
<find>get_from_os</find>
<find>OperationView(</find>
<find>get_abl</find>
<find>shutoff</find>
</findStrings>
<replaceStrings>
<replace>'ACTIVE'</replace>
......@@ -113,6 +144,9 @@
<replace>&lt;pk:slug&gt;</replace>
<replace>network/horizon/client_side/</replace>
</replaceStrings>
<dirStrings>
<dir>$PROJECT_DIR$/circle/dashboard/templates/dashboard</dir>
</dirStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
......@@ -120,12 +154,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html" />
<option value="$PROJECT_DIR$/circle/circle/urls.py" />
<option value="$PROJECT_DIR$/circle/common/views.py" />
<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/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" />
......@@ -133,15 +161,10 @@
<option value="$PROJECT_DIR$/circle/openstack_api/policy.py" />
<option value="$PROJECT_DIR$/circle/dashboard/forms.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html" />
<option value="$PROJECT_DIR$/circle/vm/models/instance.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/util.py" />
<option value="$PROJECT_DIR$/circle/request/urls.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vxlans.html" />
<option value="$PROJECT_DIR$/circle/openstack_api/base.py" />
<option value="$PROJECT_DIR$/circle/openstack_api/nova.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/index.py" />
<option value="$PROJECT_DIR$/circle/circle/settings/local.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html" />
<option value="$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_alert_message.html" />
<option value="$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_confirm.html" />
<option value="$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_loading_inline.html" />
......@@ -165,12 +188,23 @@
<option value="$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html" />
<option value="$PROJECT_DIR$/circle/network/forms.py" />
<option value="$PROJECT_DIR$/circle/circle/settings/base.py" />
<option value="$PROJECT_DIR$/circle/network/models.py" />
<option value="$PROJECT_DIR$/circle/network/views.py" />
<option value="$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
<option value="$PROJECT_DIR$/circle/network/models.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/index.py" />
<option value="$PROJECT_DIR$/circle/vm/models/instance.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html" />
<option value="$PROJECT_DIR$/circle/openstack_api/nova.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html" />
<option value="$PROJECT_DIR$/circle/common/operations.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/vm.py" />
<option value="$PROJECT_DIR$/circle/vm/operations.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/util.py" />
</list>
</option>
</component>
......@@ -244,14 +278,7 @@
<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" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
......@@ -267,7 +294,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="instance&#9;null&#9;null&#10;opera&#9;null&#9;null&#10;vmdeta&#9;null&#9;null&#10;create&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html&#10;base&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#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;index&#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&#10;sleep&#9;null&#9;null&#10;Deploy&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;Vmdeta&#9;null&#9;null&#10;list_from&#9;null&#9;null&#10;aclupda&#9;null&#9;null&#10;base.htm&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/base.html&#10;method&#9;ACTION&#9;GoToMenuEx&#10;base.ht&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/base.html&#10;base.html&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/base.html&#10;index.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/index.py&#10;index.htm&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index.html&#10;server&#9;null&#9;null&#10;Disk&#9;null&#9;null" />
<property name="SearchEverywhereHistoryKey" value="operat&#9;null&#9;null&#10;ins&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;operations&#9;FILE&#9;file:///home/h3yduck/cloud/circle/common/operations.py&#10;vmdetai&#9;null&#9;null&#10;index&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;operationvi&#9;null&#9;null&#10;server&#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;instance&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#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;opera&#9;null&#9;null&#10;vmdeta&#9;null&#9;null&#10;create&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-create.html&#10;base&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#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&#10;sleep&#9;null&#9;null&#10;Deploy&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;Vmdeta&#9;null&#9;null&#10;list_from&#9;null&#9;null&#10;aclupda&#9;null&#9;null&#10;base.htm&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/base.html&#10;method&#9;ACTION&#9;GoToMenuEx&#10;base.ht&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/base.html&#10;base.html&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/base.html&#10;index.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/index.py" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
......@@ -286,7 +313,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Django server.circlestack">
<component name="RunManager" selected="Python.operations">
<configuration name="index" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -306,6 +333,25 @@
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="operations" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/circle/common" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="cloud" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/circle/common/operations.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
</configuration>
<configuration name="circlestack" type="Python.DjangoServer" factoryName="Django server">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -329,13 +375,15 @@
<option name="useCustomRunCommand" value="false" />
<option name="customRunCommand" value="" />
</configuration>
<list size="2">
<list size="3">
<item index="0" class="java.lang.String" itemvalue="Django server.circlestack" />
<item index="1" class="java.lang.String" itemvalue="Python.index" />
<item index="2" class="java.lang.String" itemvalue="Python.operations" />
</list>
<recent_temporary>
<list size="1">
<item index="0" class="java.lang.String" itemvalue="Python.index" />
<list size="2">
<item index="0" class="java.lang.String" itemvalue="Python.operations" />
<item index="1" class="java.lang.String" itemvalue="Python.index" />
</list>
</recent_temporary>
</component>
......@@ -381,7 +429,7 @@
<window_info id="SciView" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.35200846" sideWeight="0.5101172" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3911205" sideWeight="0.5101172" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
......@@ -449,7 +497,7 @@
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<line-breakpoint suspend="THREAD" type="python-line">
<url>file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/contrib/sessions/backends/db.py</url>
<line>82</line>
<option name="timeStamp" value="13" />
......@@ -465,7 +513,7 @@
</properties>
</breakpoint>
</default-breakpoints>
<option name="time" value="189" />
<option name="time" value="208" />
</breakpoint-manager>
<watches-manager />
</component>
......@@ -498,17 +546,17 @@
</expressions>
<expressions id="evaluateExpression">
<expression>
<expression-string>openstack_api.neutron.subnet_create(self.request, network_created.id, ip_version=4, cidr=&quot;&quot;)</expression-string>
<expression-string>reverse_lazy('dashboard.views.detail', self.get_object().id)</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>openstack_api.neutron.subnet_create(self.request, network_created.id, ip_version=4, cidr=&quot;0.0.0.0/0&quot;)</expression-string>
<expression-string>self</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>openstack_api.neutron.subnet_create(self.request, network_created.id, ip_version=4, cidr=&quot;0.0.0.0/64&quot;)</expression-string>
<expression-string>self.instance</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
......@@ -518,430 +566,450 @@
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>self.object.</expression-string>
<expression-string>openstack_api.nova.server_get(self.request, self.kwargs['pk'])</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>form</expression-string>
<expression-string>self.model</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>self.object.name</expression-string>
<expression-string>self.model.id</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>self._get_networks(request)</expression-string>
<expression-string>get_operation_class(type(self), name)(self)</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
<expression>
<expression-string>self._get_servers(request)</expression-string>
<expression-string>get_operation_class(type(self), name)</expression-string>
<language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode>
</expression>
</expressions>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/template.html">
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/editor.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" />
<caret line="0" column="22" lean-forward="false" selection-start-line="0" selection-start-column="22" selection-end-line="0" selection-end-column="22" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_modal.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/user.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<state relative-caret-position="354">
<caret line="79" column="32" lean-forward="false" selection-start-line="79" selection-start-column="32" selection-end-line="79" selection-end-column="32" />
<folding>
<element signature="e#731#787#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_membership.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="20" lean-forward="false" selection-start-line="0" selection-start-column="20" selection-end-line="0" selection-end-column="20" />
<caret line="0" column="18" lean-forward="false" selection-start-line="0" selection-start-column="18" selection-end-line="0" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_script_loader.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/static/vue.css">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<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/django/template/loaders/base.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/base.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="284">
<caret line="39" column="0" lean-forward="false" selection-start-line="39" selection-start-column="0" selection-end-line="39" selection-end-column="0" />
<state relative-caret-position="272">
<caret line="16" column="20" lean-forward="false" selection-start-line="16" selection-start-column="20" selection-end-line="16" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/template/base.py">
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1109">
<caret line="229" column="0" lean-forward="false" selection-start-line="229" selection-start-column="0" selection-end-line="229" selection-end-column="0" />
<state relative-caret-position="204">
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding>
<element signature="e#422#429#1#HTML" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templatetags/__init__.py">
<entry file="file://$PROJECT_DIR$/circle/network/forms.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="6273">
<caret line="383" column="57" lean-forward="false" selection-start-line="383" selection-start-column="57" selection-end-line="383" selection-end-column="57" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/openstack_api/network.py">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/client.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="274">
<caret line="321" column="21" lean-forward="false" selection-start-line="321" selection-start-column="21" selection-end-line="321" selection-end-column="21" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/_loading_modal.html">
<entry file="file://$PROJECT_DIR$/circle/vm/models/activity.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="289">
<caret line="17" column="0" lean-forward="false" selection-start-line="17" selection-start-column="0" selection-end-line="17" selection-end-column="0" />
<state relative-caret-position="195">
<caret line="43" column="8" lean-forward="false" selection-start-line="43" selection-start-column="8" selection-end-line="43" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templatetags/horizon.py">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/lib/python2.7/site-packages/novaclient/v2/servers.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="561">
<caret line="33" column="7" lean-forward="false" selection-start-line="33" selection-start-column="7" selection-end-line="33" selection-end-column="7" />
<state relative-caret-position="22168">
<caret line="1314" column="38" lean-forward="false" selection-start-line="1314" selection-start-column="38" selection-end-line="1314" selection-end-column="38" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/horizon/client_side/templates.html">
<entry file="file://$PROJECT_DIR$/circle/circle/wsgi.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="54" lean-forward="false" selection-start-line="4" selection-start-column="54" selection-end-line="4" selection-end-column="54" />
<state relative-caret-position="376">
<caret line="59" column="0" lean-forward="false" selection-start-line="59" selection-start-column="0" selection-end-line="59" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/static/js/horizon.loader.js">
<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="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="1309">
<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/network/static/js/horizon.networktopologycommon.js">
<entry file="file://$PROJECT_DIR$/circle/circle/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="544">
<caret line="47" column="39" lean-forward="false" selection-start-line="47" selection-start-column="24" selection-end-line="47" selection-end-column="39" />
<state relative-caret-position="831">
<caret line="49" column="25" lean-forward="true" selection-start-line="49" selection-start-column="25" selection-end-line="49" selection-end-column="25" />
<folding>
<element signature="e#732#773#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/static/js/horizon.networktopology.js">
<entry file="file://$PROJECT_DIR$/circle/network/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="828">
<caret line="113" column="49" lean-forward="true" selection-start-line="113" selection-start-column="49" selection-end-line="113" selection-end-column="49" />
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/urls.py">
<entry file="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2/typing.pyi">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="130" column="79" lean-forward="true" selection-start-line="130" selection-start-column="79" selection-end-line="130" selection-end-column="79" />
<state relative-caret-position="195">
<caret line="225" column="8" lean-forward="false" selection-start-line="225" selection-start-column="8" selection-end-line="225" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/static/js/horizon.flatnetworktopology.js">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="709">
<caret line="92" column="53" lean-forward="false" selection-start-line="92" selection-start-column="53" selection-end-line="92" selection-end-column="53" />
<state relative-caret-position="195">
<caret line="192" column="0" lean-forward="false" selection-start-line="192" selection-start-column="0" selection-end-line="192" selection-end-column="0" />
<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/neutronclient/v2_0/client.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="22" lean-forward="false" selection-start-line="0" selection-start-column="22" selection-end-line="0" selection-end-column="22" />
<state relative-caret-position="306">
<caret line="836" column="8" lean-forward="false" selection-start-line="836" selection-start-column="8" selection-end-line="836" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/neutron.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="663">
<caret line="1121" column="43" lean-forward="false" selection-start-line="1121" selection-start-column="43" selection-end-line="1121" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/user.py">
<entry file="file://$PROJECT_DIR$/circle/circle/settings/base.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="354">
<caret line="79" column="32" lean-forward="false" selection-start-line="79" selection-start-column="32" selection-end-line="79" selection-end-column="32" />
<folding>
<element signature="e#731#787#0" expanded="false" />
</folding>
<state relative-caret-position="862">
<caret line="579" column="34" lean-forward="false" selection-start-line="579" selection-start-column="34" selection-end-line="579" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/urls.py">
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/vxlan-create.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="301">
<caret line="138" column="10" lean-forward="false" selection-start-line="138" selection-start-column="10" selection-end-line="138" selection-end-column="10" />
<state relative-caret-position="335">
<caret line="25" column="53" lean-forward="false" selection-start-line="25" selection-start-column="53" selection-end-line="25" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/bower.json">
<entry file="file://$PROJECT_DIR$/circle/dashboard/forms.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="476">
<caret line="28" column="20" lean-forward="true" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<state relative-caret-position="306">
<caret line="990" column="6" lean-forward="false" selection-start-line="990" selection-start-column="6" selection-end-line="990" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/fabfile.py">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/neutron_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="84" column="13" lean-forward="false" selection-start-line="84" selection-start-column="13" selection-end-line="84" selection-end-column="65" />
<state relative-caret-position="178">
<caret line="117" column="28" lean-forward="false" selection-start-line="117" selection-start-column="19" selection-end-line="117" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/base.html">
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="18" lean-forward="false" selection-start-line="0" selection-start-column="18" selection-end-line="0" selection-end-column="18" />
<state relative-caret-position="178">
<caret line="50" column="29" lean-forward="false" selection-start-line="50" selection-start-column="20" selection-end-line="50" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/static/vue.css">
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/base.html">
<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="272">
<caret line="16" column="20" lean-forward="false" selection-start-line="16" selection-start-column="20" selection-end-line="16" selection-end-column="20" />
<state relative-caret-position="476">
<caret line="55" column="31" lean-forward="true" selection-start-line="55" selection-start-column="31" selection-end-line="55" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/vxlan-edit.html">
<entry file="file://$PROJECT_DIR$/circle/network/models.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="0" lean-forward="false" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
<folding>
<element signature="e#422#429#1#HTML" expanded="true" />
</folding>
<state relative-caret-position="459">
<caret line="70" column="29" lean-forward="false" selection-start-line="70" selection-start-column="29" selection-end-line="70" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/forms.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/index.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="6273">
<caret line="383" column="57" lean-forward="false" selection-start-line="383" selection-start-column="57" selection-end-line="383" selection-end-column="57" />
<state relative-caret-position="17">
<caret line="43" column="83" lean-forward="false" selection-start-line="43" selection-start-column="83" selection-end-line="43" selection-end-column="83" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/client.py">
<entry file="file://$PROJECT_DIR$/circle/network/views.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="274">
<caret line="321" column="21" lean-forward="false" selection-start-line="321" selection-start-column="21" selection-end-line="321" selection-end-column="21" />
<state relative-caret-position="280">
<caret line="973" column="23" lean-forward="false" selection-start-line="973" selection-start-column="4" selection-end-line="973" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/models/activity.py">
<entry file="file://$PROJECT_DIR$/circle/request/templates/request/initials/resources.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="43" column="8" lean-forward="false" selection-start-line="43" selection-start-column="8" selection-end-line="43" selection-end-column="8" />
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/lib/python2.7/site-packages/novaclient/v2/servers.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="22168">
<caret line="1314" column="38" lean-forward="false" selection-start-line="1314" selection-start-column="38" selection-end-line="1314" selection-end-column="38" />
<state relative-caret-position="318">
<caret line="33" column="23" lean-forward="false" selection-start-line="33" selection-start-column="23" selection-end-line="33" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/resources.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="20791">
<caret line="1233" column="41" lean-forward="false" selection-start-line="1233" selection-start-column="41" selection-end-line="1233" selection-end-column="41" />
<state relative-caret-position="493">
<caret line="29" column="110" lean-forward="true" selection-start-line="29" selection-start-column="110" selection-end-line="29" selection-end-column="110" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/wsgi.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templatetags/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="376">
<caret line="59" column="0" lean-forward="false" selection-start-line="59" selection-start-column="0" selection-end-line="59" selection-end-column="0" />
<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" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/views/generic/base.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templatetags/arrowfilter.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1309">
<caret line="87" column="0" lean-forward="false" selection-start-line="87" selection-start-column="0" selection-end-line="87" selection-end-column="0" />
<state relative-caret-position="340">
<caret line="22" column="0" lean-forward="false" selection-start-line="22" selection-start-column="0" selection-end-line="30" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1192">
<caret line="1233" column="41" lean-forward="false" selection-start-line="1233" selection-start-column="41" selection-end-line="1233" selection-end-column="41" />
<folding />
</state>
</provider>
</entry>
<entry file="file:///usr/lib/python2.7/collections.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="8432">
<caret line="517" column="72" lean-forward="false" selection-start-line="517" selection-start-column="72" selection-end-line="517" selection-end-column="72" />
<state relative-caret-position="272">
<caret line="17" column="26" lean-forward="true" selection-start-line="17" selection-start-column="26" selection-end-line="17" selection-end-column="26" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/urls.py">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="831">
<caret line="49" column="25" lean-forward="true" selection-start-line="49" selection-start-column="25" selection-end-line="49" selection-end-column="25" />
<state relative-caret-position="442">
<caret line="151" column="65" lean-forward="true" selection-start-line="151" selection-start-column="65" selection-end-line="151" selection-end-column="65" />
<folding>
<element signature="e#732#773#0" expanded="false" />
<element signature="e#864#902#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/__init__.py">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/utils/translation/__init__.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="306">
<caret line="104" column="0" lean-forward="false" selection-start-line="104" selection-start-column="0" selection-end-line="104" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$APPLICATION_HOME_DIR$/helpers/typeshed/stdlib/2/typing.pyi">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templatetags/instance_tags.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="225" column="8" lean-forward="false" selection-start-line="225" selection-start-column="8" selection-end-line="225" selection-end-column="8" />
<folding />
<state relative-caret-position="391">
<caret line="23" column="29" lean-forward="false" selection-start-line="23" selection-start-column="29" selection-end-line="23" selection-end-column="29" />
<folding>
<element signature="e#0#35#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="192" column="0" lean-forward="false" selection-start-line="192" selection-start-column="0" selection-end-line="192" selection-end-column="0" />
<state relative-caret-position="374">
<caret line="22" column="44" lean-forward="true" selection-start-line="22" selection-start-column="44" selection-end-line="22" selection-end-column="44" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/neutronclient/v2_0/client.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/console.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="836" column="8" lean-forward="false" selection-start-line="836" selection-start-column="8" selection-end-line="836" selection-end-column="8" />
<state relative-caret-position="153">
<caret line="9" column="11" lean-forward="true" selection-start-line="9" selection-start-column="11" selection-end-line="9" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/openstack_api/neutron.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="663">
<caret line="1121" column="43" lean-forward="false" selection-start-line="1121" selection-start-column="43" selection-end-line="1121" selection-end-column="43" />
<state relative-caret-position="-243">
<caret line="114" column="27" lean-forward="false" selection-start-line="114" selection-start-column="27" selection-end-line="114" selection-end-column="27" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/views.py">
<entry file="file://$PROJECT_DIR$/circle/fabfile.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="442">
<caret line="1016" column="45" lean-forward="false" selection-start-line="1016" selection-start-column="45" selection-end-line="1016" selection-end-column="45" />
<folding>
<element signature="e#732#743#0" expanded="false" />
</folding>
<state relative-caret-position="170">
<caret line="84" column="13" lean-forward="false" selection-start-line="84" selection-start-column="13" selection-end-line="84" selection-end-column="65" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/settings/base.py">
<entry file="file://$PROJECT_DIR$/circle/bower.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="862">
<caret line="579" column="34" lean-forward="false" selection-start-line="579" selection-start-column="34" selection-end-line="579" selection-end-column="34" />
<state relative-caret-position="476">
<caret line="28" column="20" lean-forward="true" selection-start-line="28" selection-start-column="20" selection-end-line="28" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/models.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-vm.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="692">
<caret line="96" column="72" lean-forward="false" selection-start-line="96" selection-start-column="72" selection-end-line="96" selection-end-column="72" />
<state relative-caret-position="-663">
<caret line="33" column="45" lean-forward="false" selection-start-line="33" selection-start-column="30" selection-end-line="33" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/network/templates/network/vxlan-create.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="335">
<caret line="25" column="53" lean-forward="false" selection-start-line="25" selection-start-column="53" selection-end-line="25" selection-end-column="53" />
<state relative-caret-position="183">
<caret line="114" column="0" lean-forward="false" selection-start-line="114" selection-start-column="0" selection-end-line="114" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/forms.py">
<entry file="file://$PROJECT_DIR$/circle/common/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="990" column="6" lean-forward="false" selection-start-line="990" selection-start-column="6" selection-end-line="990" selection-end-column="24" />
<state relative-caret-position="254">
<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/circle/os_policies/neutron_policy.json">
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="178">
<caret line="117" column="28" lean-forward="false" selection-start-line="117" selection-start-column="19" selection-end-line="117" selection-end-column="28" />
<folding />
<state relative-caret-position="245">
<caret line="648" column="76" lean-forward="true" selection-start-line="648" selection-start-column="76" selection-end-line="648" selection-end-column="76" />
<folding>
<element signature="e#732#788#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/circle/os_policies/nova_policy.json">
<entry file="file://$PROJECT_DIR$/circle/vm/models/instance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="178">
<caret line="50" column="29" lean-forward="false" selection-start-line="50" selection-start-column="20" selection-end-line="50" selection-end-column="29" />
<state relative-caret-position="109">
<caret line="446" column="43" lean-forward="false" selection-start-line="446" selection-start-column="43" selection-end-line="446" selection-end-column="43" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="20" lean-forward="false" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
<state relative-caret-position="-2636">
<caret line="58" column="36" lean-forward="true" selection-start-line="58" selection-start-column="14" selection-end-line="58" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="207">
<caret line="341" column="31" lean-forward="false" selection-start-line="341" selection-start-column="31" selection-end-line="341" selection-end-column="31" />
<state relative-caret-position="175">
<caret line="1270" column="0" lean-forward="false" selection-start-line="1270" selection-start-column="0" selection-end-line="1270" selection-end-column="0" />
<folding>
<element signature="e#731#787#0" expanded="true" />
<element signature="e#40423#41594#0" expanded="false" />
<element signature="e#40629#41800#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/models/instance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="224">
<caret line="213" column="8" lean-forward="false" selection-start-line="213" selection-start-column="8" selection-end-line="221" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/util.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="207">
<caret line="184" column="39" lean-forward="false" selection-start-line="184" selection-start-column="39" selection-end-line="184" selection-end-column="39" />
<state relative-caret-position="311">
<caret line="334" column="41" lean-forward="false" selection-start-line="334" selection-start-column="41" selection-end-line="334" selection-end-column="41" />
<folding />
</state>
</provider>
......
......@@ -49,8 +49,6 @@ class Operation(object):
def __prelude(self, request, kwargs):
"""This method contains the shared prelude of call and async.
"""
self._operation.im_self.get_from_os(request)
defaults = {'system': False, 'user': None}
allargs = dict(defaults, **kwargs) # all arguments
......@@ -229,12 +227,26 @@ def register_operation(op_cls, op_id=None, target_cls=None):
assert not hasattr(target_cls, op_id), (
"target class already has an attribute with this id")
if not issubclass(target_cls, OperatedMixin):
raise TypeError("%r is not a subclass of %r" %
(target_cls.__name__, OperatedMixin.__name__))
if not hasattr(target_cls, operation_registry_name):
setattr(target_cls, operation_registry_name, dict())
getattr(target_cls, operation_registry_name)[op_id] = op_cls
def get_operation_class(cls, name):
ops = getattr(cls, operation_registry_name, {})
op = ops.get(name)
if op:
return op
else:
raise AttributeError("%r object has no attribute %r" %
(cls.__name__, name))
def __getattr__(self, name):
# NOTE: __getattr__ is only called if the attribute doesn't already
# exist in your __dict__
return get_operation_class(type(self), name)(self)
target_cls.__getattr__ = __getattr__
return op_cls
{% load i18n %}
{% load instance_tags %}
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right toolbar">
......@@ -26,10 +28,10 @@
<div class="list-group" id="vm-list-view">
<div id="dashboard-vm-list">
{% for i in instances %}
<a href="{{ i.get_absolute_url }}" class="list-group-item
<a href="{% url 'dashboard.views.detail' i.id %}" class="list-group-item
{% if forloop.last and instances|length < 5 %} list-group-item-last{% endif %}">
<span class="index-vm-list-name">
<i class="fa {{ i.get_status_icon }}" title="{{ i.get_status_display }}"></i>
<i class="fa {{ i | get_status_icon }}" title="{{ i.get_status_display }}"></i>
{{ i.name }}
</span>
<small class="text-muted index-vm-list-host">
......
......@@ -2,6 +2,7 @@
{% load staticfiles %}
{% load i18n %}
{% load pipeline %}
{% load instance_tags %}
{% block title-page %}{{ instance.name }} | vm{% endblock %}
......@@ -101,8 +102,9 @@
{% if is_new_state %}
fa-spinner fa-spin
{% else %}
{{ instance.get_status_icon }}{% endif %}"></i>
<span>{{ instance.get_status_display|upper }}</span>
{{ instance | get_status_icon }}
{% endif %}"></i>
<span>{{ instance|get_status_display|upper }}</span>
</span>
</div>
......@@ -223,7 +225,7 @@
</li>
<li>
<a href="#activity" data-toggle="pill" data-target="#_activity" class="text-center"
data-activity-url="{% url "dashboard.views.vm-activity-list" instance.pk %}">
data-activity-url="{% url "dashboard.views.vm-activity-list" instance.id %}">
<i class="fa fa-clock-o fa-2x"></i><br>
{% trans "Activity" %}</a>
</li>
......
......@@ -5,48 +5,6 @@
<div class="alert alert-warning">
{% trans "You are not authorized to access the VNC console." %}
</div>
{% endif %}
<div class="row">
<div class="col-xs-7">
<div class="btn-toolbar">
{% if perms.vm.access_console %}
<button id="sendCtrlAltDelButton" class="btn btn-danger btn-sm">
{% trans "Send Ctrl+Alt+Del" %}
</button>
<button id="sendPasswordButton" class="btn btn-default btn-sm">
{% trans "Type password" %}
</button>
{% endif %}
</div>
</div>
<div class="col-xs-5 text-right">
<button id="getScreenshotButton" class="btn btn-info btn-sm" data-vm-pk="{{ instance.pk }}">
<i class="fa fa-photo"></i> {% trans "Screenshot" %}
</button>
</div>
</div>
{% if True %}
<div class="alert alert-info" id="noVNC_status"></div>
{% endif %}
<div id="vm-console-screenshot">
<h3>
<button class="btn btn-danger btn-sm pull-right">{% trans "Close" %}</button>
{% trans "Screenshot" %}
</h3>
<img alt="{% trans "Screenshot" %}"/>
<hr />
</div>
{% if True %}
{% else %}
<iframe src="{{ vnc_url }}" style="width: 100%; height: 664px;"></iframe>
{#<canvas id="noVNC_canvas" width="640" height="20">Canvas not supported.#}
{#</canvas>#}
{#<script>#}
{#var INCLUDE_URI = '{% static "no-vnc/include/" %}';#}
{#var VNC_URL = "{{ vnc_url }}";#}
{#</script>#}
{% endif %}
......@@ -4,7 +4,7 @@
<div class="col-md-4">
<dl id="home_name_and_description">
<dt>{% trans "System" %}:</dt>
<dd><i class="fa fa-{{ os_type_icon }}"></i> {{ instance.system }}</dd>
<dd><i class="fa fa-{{ os_type_icon }}"></i> {{ instance.image_name }}</dd>
<dt style="margin-top: 5px;">
{% trans "Name" %}:
{% if is_operator %}
......
......@@ -32,7 +32,7 @@
<input type="submit" class="btn btn-success btn-sm"/>
</div>
<a href="{% url "request.views.request-resource" vm_pk=object.pk %}"
<a href="{% url "request.views.request-resource" vm_pk=object.id %}"
class="btn btn-primary btn-sm" id="vm-request-resource">
<i class="fa fa-tasks"></i>
{% trans "Request resources" %}
......
from django.template import Library
from django.utils.translation import ugettext_lazy as _
register = Library()
@register.filter
def get_status_icon(instance):
return {
'BUILDING': 'fa-rocket',
'ACTIVE': 'fa-play',
'SHUTOFF': 'fa-stop',
'SUSPENDED': 'fa-pause',
'ERROR': 'fa-warning',
'SOFT_DELETED': 'fa-trash-o',
'HARD_DELETED': 'fa-trash-o',
}.get(instance.status, 'fa-question')
@register.filter
def get_status_display(instance):
DISPLAYS = {
'PAUSED': _('paused'),
'SUSPENDED': _('suspended'),
'ACTIVE': _('active'),
'SHUTOFF': _('shutoff'),
'RESCUED': _('rescued'),
'STOPPED': _('stopped'),
'SOFT_DELETED': _('soft deleted'),
'ERROR': _('error'),
'BUILDING': _('building'),
}
return DISPLAYS[instance.status] if instance.status in DISPLAYS else instance.status
\ No newline at end of file
......@@ -18,6 +18,7 @@ from __future__ import unicode_literals, absolute_import
import logging
import openstack_api
from braces.views import LoginRequiredMixin
from dashboard.models import GroupProfile
from django.conf import settings
......@@ -40,7 +41,7 @@ class IndexView(LoginRequiredMixin, TemplateView):
user = self.request.user
context = super(IndexView, self).get_context_data(**kwargs)
instances = Instance.list_from_os(self.request)
instances = openstack_api.nova.server_list(self.request)[0] #TODO: flatten?
context.update({
'instances': instances[:5],
......@@ -106,7 +107,8 @@ class IndexView(LoginRequiredMixin, TemplateView):
'operator', user, disregard_superuser=True).all()[:5]
# vxlan
context['vxlans'] = Vxlan.list_from_os(self.request)[:5]
all_vxlans = openstack_api.neutron.network_list_for_tenant(self.request, self.request.user.tenant_id)
context['vxlans'] = all_vxlans[:5]
# toplist
if settings.STORE_URL:
......
......@@ -20,6 +20,7 @@ import logging
import re
from collections import OrderedDict
import openstack_api
from braces.views import LoginRequiredMixin
from common.models import HumanReadableException
from django.conf import settings
......@@ -200,7 +201,6 @@ class CheckedDetailView(LoginRequiredMixin, DetailView):
#
class OperationView(RedirectToLoginMixin, DetailView):
template_name = 'dashboard/operate.html'
show_in_toolbar = True
effect = None
......@@ -220,7 +220,7 @@ class OperationView(RedirectToLoginMixin, DetailView):
@classmethod
def get_urlname(cls):
return 'dashboard.%s.op.%s' % (cls.model._meta.model_name, cls.op)
return 'dashboard.%s.op.%s' % (type(cls.model).__name__, cls.op)
@classmethod
def get_instance_url(cls, pk, key=None, *args, **kwargs):
......@@ -231,7 +231,7 @@ class OperationView(RedirectToLoginMixin, DetailView):
return "%s?k=%s" % (url, key)
def get_url(self, **kwargs):
return self.get_instance_url(self.get_object().pk, **kwargs)
return self.get_instance_url(self.get_object().id, **kwargs)
def get_template_names(self):
if self.request.is_ajax():
......@@ -239,9 +239,6 @@ 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)
......@@ -275,7 +272,6 @@ class OperationView(RedirectToLoginMixin, DetailView):
cls.get_operation_class().check_perms(user)
def get(self, request, *args, **kwargs):
self.get_op().instance.get_from_os(request)
self.check_auth(request)
return super(OperationView, self).get(request, *args, **kwargs)
......@@ -292,9 +288,7 @@ class OperationView(RedirectToLoginMixin, DetailView):
return extra
def post(self, request, extra=None, *args, **kwargs):
self.get_op().instance.get_from_os(request)
self.check_auth(request)
self.object = self.get_object()
if extra is None:
extra = {}
result = None
......@@ -338,8 +332,8 @@ class OperationView(RedirectToLoginMixin, DetailView):
return HttpResponse(json.dumps(data),
content_type="application/json")
else:
return HttpResponseRedirect("%s#activity" %
self.object.get_absolute_url())
return HttpResponseRedirect("#activity")
#TODO: removed full path from this redirect but it does not seem to matter if i remove response at all
@classmethod
def factory(cls, op, icon='cog', effect='info', extra_bases=(), **kwargs):
......
......@@ -26,7 +26,7 @@ from django.conf import settings
from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse_lazy
from django.core.urlresolvers import reverse_lazy, reverse
from django.http import (
HttpResponse, Http404, HttpResponseRedirect, JsonResponse
)
......@@ -48,6 +48,7 @@ from common.models import (
)
from firewall.models import Vlan, Host, Rule
from manager.scheduler import SchedulerError
from openstack_api.nova import Server
from request.forms import TemplateRequestForm
from request.models import TemplateAccessType
from storage.models import Disk
......@@ -92,7 +93,6 @@ logger = logging.getLogger(__name__)
class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
template_name = "dashboard/vm-detail.html"
model = Instance
def get(self, *args, **kwargs):
if self.request.is_ajax():
......@@ -108,16 +108,16 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
"password": instance.pw}
def get_object(self, queryset=None):
return Instance(os_server_id=self.kwargs['pk']).get_from_os(self.request)
return openstack_api.nova.server_get(self.request, self.kwargs['pk'])
def get_context_data(self, **kwargs):
context = super(VmDetailView, self).get_context_data(**kwargs)
instance = context['instance']
instance = self.object
user = self.request.user
ops = get_operations(instance, user, self.request)
hide_tutorial = self.request.COOKIES.get(
"hide_tutorial_for_%s" % instance.pk) == "True"
vnc_console = openstack_api.nova.server_vnc_console(self.request, instance.os_server_id)
"hide_tutorial_for_%s" % instance.id) == "True"
vnc_console = openstack_api.nova.server_vnc_console(self.request, instance.id)
context.update({
'graphite_enabled': settings.GRAPHITE_URL is not None,
'vnc_url': vnc_console.url,
......@@ -125,7 +125,8 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
'op': {i.op: i for i in ops},
# 'connect_commands': user.profile.get_connect_commands(instance),
'hide_tutorial': hide_tutorial,
'fav': instance.favourite_set.filter(user=user).exists(),
'fav': [], #instance.favourite_set.filter(user=user).exists(),
'instance': self.object
})
# activity data
......@@ -139,7 +140,7 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
# latest.resultant_state is not None and
# instance.status != latest.resultant_state)
activities = openstack_api.nova.instance_action_list(self.request, instance.os_server_id)
activities = openstack_api.nova.instance_action_list(self.request, instance.id)
# context['vlans'] = Vlan.get_objects_with_level(
# 'user', self.request.user
......@@ -147,16 +148,16 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
# pk__in=Interface.objects.filter(
# instance=self.get_object()).values_list("vlan", flat=True)
# ).all()
context['os_type_icon'] = instance.os_type.replace("unknown",
"question")
# context['os_type_icon'] = instance.os_type.replace("unknown",
# "question")
# ipv6 infos
context['ipv6_host'] = instance.get_connect_host(use_ipv6=True)
# context['ipv6_host'] = instance.get_connect_host(use_ipv6=True)
# context['ipv6_port'] = instance.get_connect_port(use_ipv6=True)
# resources forms
can_edit = True
context['resources_form'] = VmResourcesForm(
can_edit=can_edit, instance=instance)
# context['resources_form'] = VmResourcesForm(
# can_edit=can_edit, instance=instance)
# if self.request.user.is_superuser:
# context['traits_form'] = TraitsForm(instance=instance)
......@@ -170,7 +171,7 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
context['client_download'] = self.request.COOKIES.get(
'downloaded_client')
# can link template
context['can_link_template'] = instance.template
# context['can_link_template'] = instance.template
# operation also allows RUNNING (if with_shutdown is present)
context['save_resources_enabled'] = instance.status in (
......@@ -284,15 +285,18 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
#
#
class VmOperationView(AjaxOperationMixin, OperationView):
model = Instance
model = Server
context_object_name = 'instance' # much simpler to mock object
def get_context_data(self, **kwargs):
ctx = super(VmOperationView, self).get_context_data(**kwargs)
self.object.get_from_os(self.request)
return ctx
def get_object(self):
return openstack_api.nova.server_get(self.request, self.kwargs['pk'])
def getModelUrl(self):
return reverse('dashboard.views.detail', self.get_object().id)
def get_operations(instance, user, request):
ops = []
......@@ -304,7 +308,7 @@ def get_operations(instance, user, request):
except PermissionDenied as e:
logger.debug('Not showing operation %s for %s: %s',
k, instance, unicode(e))
except Exception:
except Exception as e:
ops.append(v.bind_to_object(instance, disabled=True))
else:
ops.append(v.bind_to_object(instance))
......@@ -1249,8 +1253,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
#
@require_GET
def vm_activity(request, pk):
instance = Instance.objects.get(pk=pk)
instance.get_from_os(request)
instance = openstack_api.nova.server_get(request, pk)
response = {}
show_all = request.GET.get("show_all", "false") == "true"
......@@ -1260,14 +1263,14 @@ def vm_activity(request, pk):
# if not show_all:
# activities = activities[:10]
response['connect_uri'] = instance.get_connect_uri()
response['human_readable_status'] = instance.get_status_display()
# response['connect_uri'] = instance.get_connect_uri()
# response['human_readable_status'] = instance.get_status_display()
response['status'] = instance.status
response['icon'] = instance.get_status_icon()
latest = instance.get_latest_activity_in_progress()
response['is_new_state'] = (latest and
latest.resultant_state is not None and
instance.status != latest.resultant_state)
# response['icon'] = instance.get_status_icon()
# latest = instance.get_latest_activity_in_progress()
# response['is_new_state'] = (latest and
# latest.resultant_state is not None and
# instance.status != latest.resultant_state)
context = {
'instance': instance,
......
......@@ -70,10 +70,6 @@ class Vxlan(models.Model):
class Meta:
app_label = 'network'
@classmethod
def list_from_os(cls, request):
return openstack_api.neutron.network_list_for_tenant(request, request.user.tenant_id)
def __unicode__(self):
return self.name
......
......@@ -368,30 +368,6 @@ class Instance(OperatedMixin, TimeStampedModel):
return inst
@classmethod
def list_from_os(cls, request):
def get_or_create_from_os_server(os_server):
try:
i = Instance.objects.get(os_server_id=os_server.id)
i._os_server = os_server
return i
except:
i = Instance()
# i.full_clean()
# i.set_level(i.owner, 'owner')
i.os_server_id = os_server.id
i._os_server = os_server
i.save()
return i
os_servers = openstack_api.nova.server_list(request)[0] #TODO: flatten
return [get_or_create_from_os_server(os_server) for os_server in os_servers]
def get_from_os(self, request):
self._os_server = openstack_api.nova.server_get(request, self.os_server_id)
return self
@classmethod
def create_from_template(cls, template, owner, disks=None, networks=None,
req_traits=None, tags=None, **kwargs):
"""Create a new instance based on an InstanceTemplate.
......
......@@ -34,6 +34,7 @@ from django.utils import timezone
from django.utils.translation import ugettext_lazy as _, ugettext_noop
from django.conf import settings
from django.db.models import Q
from openstack_api.nova import Server
from sizefield.utils import filesizeformat
......@@ -61,7 +62,6 @@ from storage.tasks import storage_tasks
logger = getLogger(__name__)
class RemoteOperationMixin(object):
remote_timeout = 30
......@@ -96,7 +96,7 @@ class AbortableRemoteOperationMixin(object):
class InstanceOperation(Operation):
acl_level = 'owner'
host_cls = Instance
host_cls = Server
concurrency_check = True
accept_states = None
deny_states = None
......@@ -128,7 +128,7 @@ class InstanceOperation(Operation):
check = import_string("openstack_auth.policy.check")
has_rights = check(self.os_policy_actions, request,
{'project_id': self.instance._os_server.tenant_id})
{'project_id': self.instance.tenant_id})
if not has_rights:
raise humanize_exception(ugettext_noop(
......@@ -142,9 +142,6 @@ class InstanceOperation(Operation):
"""
return False
def get_from_os(self, request):
self.instance.get_from_os(request)
class RemoteInstanceOperation(RemoteOperationMixin, InstanceOperation):
remote_queue = ('vm', 'fast')
......@@ -310,7 +307,7 @@ class DeployOperation(InstanceOperation):
self.instance.status == self.instance.STATUS.SHUTOFF)
def _operation(self, request, node=None):
openstack_api.nova.server_start(request, self.instance.os_server_id)
openstack_api.nova.server_start(request, self.instance.id)
@register_operation
......@@ -660,7 +657,7 @@ class ShutOffOperation(InstanceOperation):
os_policy_actions = (("compute", "compute:stop"),)
def _operation(self, request):
openstack_api.nova.server_stop(request, self.instance.os_server_id)
openstack_api.nova.server_stop(request, self.instance.id)
@register_operation
......
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