Commit 6814e12d by Szabolcs Gelencser

Implement lease task operations

parent b4fee3ab
......@@ -2,30 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1fbec8af-5a7c-40f9-b994-83ac07d1ae1d" name="Default" comment="">
<change beforePath="" afterPath="$PROJECT_DIR$/circle/vm/models/vm_lease.py" />
<change beforePath="" afterPath="$PROJECT_DIR$/circle/vm/startup.py" />
<change beforePath="" afterPath="$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py" />
<change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/circle/circle/db.sqlite3" afterPath="$PROJECT_DIR$/circle/circle/db.sqlite3" />
<change beforePath="$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json" afterPath="$PROJECT_DIR$/circle/circle/os_policies/circle_policy.json" />
<change beforePath="$PROJECT_DIR$/circle/circle/settings/base.py" afterPath="$PROJECT_DIR$/circle/circle/settings/base.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/lease-edit.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/lease-edit.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-list.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/template-list.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/_activity-timeline.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/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/dashboard/views/vm.py" afterPath="$PROJECT_DIR$/circle/dashboard/views/vm.py" />
<change beforePath="$PROJECT_DIR$/circle/openstack_api/keystone.py" afterPath="$PROJECT_DIR$/circle/openstack_api/keystone.py" />
<change beforePath="$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html" afterPath="$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html" />
<change beforePath="$PROJECT_DIR$/circle/vm/__init__.py" afterPath="$PROJECT_DIR$/circle/vm/__init__.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/models/common.py" afterPath="$PROJECT_DIR$/circle/vm/models/common.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/models/instance.py" afterPath="$PROJECT_DIR$/circle/vm/models/instance.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/models/vm_lease.py" afterPath="$PROJECT_DIR$/circle/vm/models/vm_lease.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/operations.py" afterPath="$PROJECT_DIR$/circle/vm/operations.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/tasks/__init__.py" afterPath="$PROJECT_DIR$/circle/vm/tasks/__init__.py" />
<change beforePath="$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py" afterPath="$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -35,7 +16,7 @@
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/cloud$celery.coverage" NAME="celery Coverage Results" MODIFIED="1526382929320" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/circle" />
<SUITE FILE_PATH="coverage/cloud$celery.coverage" NAME="celery Coverage Results" MODIFIED="1526476065985" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/circle" />
<SUITE FILE_PATH="coverage/cloud$manage.coverage" NAME="manage Coverage Results" MODIFIED="1523272351887" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/circle" />
<SUITE FILE_PATH="coverage/cloud$operations.coverage" NAME="operations Coverage Results" MODIFIED="1521451585654" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/circle/common" />
</component>
......@@ -56,83 +37,23 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="4">
<caret line="722" column="24" lean-forward="false" selection-start-line="722" selection-start-column="24" selection-end-line="722" selection-end-column="24" />
<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="318">
<caret line="668" column="42" lean-forward="false" selection-start-line="668" selection-start-column="42" selection-end-line="668" selection-end-column="42" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_vm-renew.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="33" lean-forward="false" selection-start-line="12" selection-start-column="33" selection-end-line="12" selection-end-column="33" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="_request-lease-form.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="62" lean-forward="false" selection-start-line="3" selection-start-column="62" selection-end-line="3" selection-end-column="62" />
<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">
<file leaf-file-name="local_periodic_tasks.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/local_periodic_tasks.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="116">
<caret line="68" column="17" lean-forward="false" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<state relative-caret-position="306">
<caret line="45" column="8" lean-forward="false" selection-start-line="45" selection-start-column="8" selection-end-line="45" selection-end-column="54" />
<folding>
<element signature="e#732#770#0" expanded="true" />
<element signature="e#732#746#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="urls.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/request/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="446">
<caret line="58" column="32" lean-forward="false" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="home.html" pinned="false" current-in-tab="false">
<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="170">
<caret line="58" column="25" lean-forward="false" selection-start-line="58" selection-start-column="14" selection-end-line="58" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="lease_tasks.py" pinned="false" current-in-tab="false">
<file leaf-file-name="lease_tasks.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="463">
<caret line="47" column="57" lean-forward="false" selection-start-line="47" selection-start-column="57" selection-end-line="47" selection-end-column="57" />
<state relative-caret-position="122">
<caret line="43" column="55" lean-forward="false" selection-start-line="43" selection-start-column="55" selection-end-line="43" selection-end-column="55" />
<folding>
<element signature="e#0#43#0" expanded="true" />
</folding>
......@@ -140,28 +61,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="vm_lease.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/vm/models/vm_lease.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="31" column="58" lean-forward="false" selection-start-line="31" selection-start-column="58" selection-end-line="31" selection-end-column="58" />
<folding>
<element signature="e#0#72#0" expanded="true" />
</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="213">
<caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
......@@ -174,12 +73,6 @@
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>os_po</find>
<find>accessmi</find>
<find>permissionreq</find>
<find>accessmix</find>
<find>LeaseDelete</find>
<find>has</find>
<find>policymi</find>
<find>acl</find>
<find>check</find>
......@@ -204,6 +97,12 @@
<find>request</find>
<find>vm</find>
<find>pk</find>
<find>Booleanfield</find>
<find>deployoper</find>
<find>sleep</find>
<find>state</find>
<find>stat</find>
<find>is</find>
</findStrings>
<replaceStrings>
<replace>'ACTIVE'</replace>
......@@ -270,13 +169,13 @@
<option value="$PROJECT_DIR$/circle/vm/startup.py" />
<option value="$PROJECT_DIR$/circle/vm/__init__.py" />
<option value="$PROJECT_DIR$/circle/circle/settings/base.py" />
<option value="$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html" />
<option value="$PROJECT_DIR$/circle/vm/models/vm_lease.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/vm.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html" />
<option value="$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html" />
<option value="$PROJECT_DIR$/circle/vm/operations.py" />
<option value="$PROJECT_DIR$/circle/vm/models/vm_lease.py" />
<option value="$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py" />
</list>
</option>
</component>
......@@ -352,31 +251,14 @@
<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="circle" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="vm" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="templates" type="462c0819:PsiDirectoryNode" />
<item name="dashboard" type="462c0819:PsiDirectoryNode" />
<item name="vm-detail" type="462c0819:PsiDirectoryNode" />
<item name="vm" type="462c0819:PsiDirectoryNode" />
<item name="tasks" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
......@@ -390,7 +272,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="renewope&#9;null&#9;null&#10;urls&#9;FILE&#9;file:///home/h3yduck/cloud/circle/request/urls.py&#10;url&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;instan&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;vmle&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/vm_lease.py&#10;vmdeta&#9;null&#9;null&#10;instance&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;lease&#9;null&#9;null&#10;Lease&#9;null&#9;null&#10;base&#9;null&#9;null&#10;instancete&#9;null&#9;null&#10;Template&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/template.py&#10;nova_pol&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;PermissionReq&#9;null&#9;null&#10;circlepol&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/circle_policy.json&#10;templatelist&#9;null&#9;null&#10;vmdetail&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;sessionclient&#9;null&#9;null&#10;middlewa&#9;null&#9;null&#10;backe&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_auth/backend.py&#10;local&#9;null&#9;null&#10;base.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;templateli&#9;null&#9;null&#10;te&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/template-list.html&#10;vmcrea&#9;null&#9;null&#10;index-tem&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-templates.html&#10;index&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;vxla&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-edit.html&#10;operat&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/operations.py&#10;network&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail/network.html&#10;forms.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/forms.py&#10;urls.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;nova&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;neutron_p&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/neutron_policy.json&#10;operations&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;base-d&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/confirm/base-delete.html&#10;indexvi&#9;null&#9;null&#10;vm-de&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html&#10;index-v&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;detailvi&#9;null&#9;null&#10;nova.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;operation&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;indev&#9;null&#9;null&#10;indexview&#9;null&#9;null&#10;operatio&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;vxlanc&#9;null&#9;null&#10;plain&#9;null&#9;null&#10;base.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;views.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_auth/views.py" />
<property name="SearchEverywhereHistoryKey" value="operat&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;renewoper&#9;null&#9;null&#10;lease&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/vm_lease.py&#10;renewope&#9;null&#9;null&#10;urls&#9;FILE&#9;file:///home/h3yduck/cloud/circle/request/urls.py&#10;url&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;instan&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;vmle&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/vm_lease.py&#10;vmdeta&#9;null&#9;null&#10;instance&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/models/instance.py&#10;Lease&#9;null&#9;null&#10;base&#9;null&#9;null&#10;instancete&#9;null&#9;null&#10;Template&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/views/template.py&#10;nova_pol&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;PermissionReq&#9;null&#9;null&#10;circlepol&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/circle_policy.json&#10;templatelist&#9;null&#9;null&#10;vmdetail&#9;null&#9;null&#10;Instance&#9;null&#9;null&#10;sessionclient&#9;null&#9;null&#10;middlewa&#9;null&#9;null&#10;backe&#9;FILE&#9;file:///home/h3yduck/cloud/circle/openstack_auth/backend.py&#10;local&#9;null&#9;null&#10;base.py&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/settings/base.py&#10;templateli&#9;null&#9;null&#10;te&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/template-list.html&#10;vmcrea&#9;null&#9;null&#10;index-tem&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-templates.html&#10;index&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;vxla&#9;FILE&#9;file:///home/h3yduck/cloud/circle/network/templates/network/vxlan-edit.html&#10;network&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail/network.html&#10;forms.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/forms.py&#10;urls.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/urls.py&#10;nova&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;neutron_p&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/neutron_policy.json&#10;operations&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;base-d&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/confirm/base-delete.html&#10;indexvi&#9;null&#9;null&#10;vm-de&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/vm-detail.html&#10;index-v&#9;FILE&#9;file:///home/h3yduck/cloud/circle/dashboard/templates/dashboard/index-vm.html&#10;detailvi&#9;null&#9;null&#10;nova.&#9;FILE&#9;file:///home/h3yduck/cloud/circle/circle/os_policies/nova_policy.json&#10;operation&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;indev&#9;null&#9;null&#10;indexview&#9;null&#9;null&#10;operatio&#9;FILE&#9;file:///home/h3yduck/cloud/circle/vm/operations.py&#10;vxlanc&#9;null&#9;null&#10;plain&#9;null&#9;null" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
......@@ -414,7 +296,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Django server.circlestack">
<component name="RunManager" selected="Python.celery">
<configuration name="celery" type="PythonConfigurationType" factoryName="Python">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -557,28 +439,42 @@
<component name="ToolWindowManager">
<frame x="-2" y="-1" width="1370" height="751" extended-state="0" />
<layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.329653" sideWeight="0.4978701" order="6" side_tool="false" content_ui="tabs" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32911393" sideWeight="0.4978701" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7097792" sideWeight="0.51283985" order="11" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32120255" sideWeight="0.49471298" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32120255" sideWeight="0.49471298" 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="8" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.49574015" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27373418" sideWeight="0.5250266" order="10" 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.45886075" sideWeight="0.52794564" order="10" 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.17975831" 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="12" 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="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.4978701" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32753164" sideWeight="0.4978701" order="1" side_tool="false" content_ui="tabs" />
<window_info id="SciView" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" 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.45886075" sideWeight="0.47497338" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.45886075" sideWeight="0.4720544" 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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.329653" sideWeight="0.4978701" order="6" 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="9" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.7097792" sideWeight="0.51283985" order="11" side_tool="true" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Coverage" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32120255" sideWeight="0.49471298" 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="8" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.49574015" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.27373418" sideWeight="0.5250266" order="10" side_tool="true" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17975831" 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="12" 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="5" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.4978701" order="1" side_tool="false" content_ui="tabs" />
<window_info id="SciView" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" 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="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<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.45886075" sideWeight="0.47497338" order="3" side_tool="false" content_ui="tabs" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -637,58 +533,55 @@
</properties>
</breakpoint>
</default-breakpoints>
<option name="time" value="432" />
<option name="time" value="437" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="debuggerHistoryManager">
<expressions id="evaluateCodeFragment">
<expression>
<expression-string>object.id</expression-string>
<language-id>HTML</language-id>
<expression-string>server.status == 'ACTIVE'</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>client.servers.list()</expression-string>
<expression-string>server.status is 'ACTIVE'</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>client.server.list()</expression-string>
<expression-string>now &gt; lease.time_of_suspend</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(self.os_policy_actions, self.request)</expression-string>
<language-id>Python</language-id>
<expression-string>object.id</expression-string>
<language-id>HTML</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(self.os_policy_actions, self.request,
{'project_id': self.request.user.tenant_id})</expression-string>
<expression-string>client.servers.list()</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(((&quot;circle&quot;, &quot;domain:list&quot;),), self.request,
{'project_id': self.request.user.tenant_id})</expression-string>
<expression-string>client.server.list()</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(((&quot;identity&quot;, &quot;domain:list&quot;),), self.request,
{'project_id': self.request.user.tenant_id})</expression-string>
<expression-string>check(self.os_policy_actions, self.request)</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(((&quot;circle&quot;, &quot;lease:managea&quot;),), self.request,
<expression-string>check(self.os_policy_actions, self.request,
{'project_id': self.request.user.tenant_id})</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
</expression>
<expression>
<expression-string>check(((&quot;circle&quot;, &quot;lease:manage&quot;),), self.request,
<expression-string>check(((&quot;circle&quot;, &quot;domain:list&quot;),), self.request,
{'project_id': self.request.user.tenant_id})</expression-string>
<language-id>Python</language-id>
<evaluation-mode>CODE_FRAGMENT</evaluation-mode>
......@@ -755,29 +648,6 @@
</expressions>
</component>
<component name="editorHistoryManager">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/conf/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="541">
<caret line="200" column="0" lean-forward="false" selection-start-line="200" selection-start-column="0" selection-end-line="200" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/forms.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="246" column="67" lean-forward="false" selection-start-line="246" selection-start-column="66" selection-end-line="246" selection-end-column="67" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/base.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="177">
<caret line="355" column="0" lean-forward="false" selection-start-line="355" selection-start-column="0" selection-end-line="355" selection-end-column="0" />
</state>
</provider>
</entry>
<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="381">
......@@ -797,7 +667,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" column="24" lean-forward="true" selection-start-line="2" selection-start-column="24" selection-end-line="2" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
......@@ -812,7 +681,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="190" column="36" lean-forward="true" selection-start-line="190" selection-start-column="36" selection-end-line="190" selection-end-column="36" />
<folding />
</state>
</provider>
</entry>
......@@ -828,7 +696,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="46" column="45" lean-forward="false" selection-start-line="46" selection-start-column="45" selection-end-line="46" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
......@@ -836,7 +703,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="431">
<caret line="31" column="31" lean-forward="false" selection-start-line="31" selection-start-column="31" selection-end-line="31" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
......@@ -844,7 +710,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="50" lean-forward="false" selection-start-line="5" selection-start-column="50" selection-end-line="5" selection-end-column="50" />
<folding />
</state>
</provider>
</entry>
......@@ -860,7 +725,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="550">
<caret line="52" column="8" lean-forward="false" selection-start-line="52" selection-start-column="8" selection-end-line="52" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
......@@ -876,7 +740,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="278">
<caret line="53" column="0" lean-forward="false" selection-start-line="53" selection-start-column="0" selection-end-line="53" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
......@@ -884,7 +747,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="102">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
......@@ -918,7 +780,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="119">
<caret line="7" column="17" lean-forward="false" selection-start-line="7" selection-start-column="17" selection-end-line="7" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
......@@ -942,7 +803,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-408">
<caret line="8" column="6" lean-forward="false" selection-start-line="8" selection-start-column="6" selection-end-line="8" selection-end-column="6" />
<folding />
</state>
</provider>
</entry>
......@@ -950,17 +810,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="68">
<caret line="4" column="24" lean-forward="false" selection-start-line="4" selection-start-column="24" selection-end-line="4" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/local_periodic_tasks.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-355">
<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>
<element signature="e#732#746#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
......@@ -968,7 +817,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="88">
<caret line="23" column="32" lean-forward="false" selection-start-line="23" selection-start-column="32" selection-end-line="24" selection-end-column="55" />
<folding />
</state>
</provider>
</entry>
......@@ -984,7 +832,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-609">
<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>
......@@ -992,7 +839,6 @@
<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>
......@@ -1008,7 +854,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="190">
<caret line="21" column="0" lean-forward="true" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
......@@ -1026,7 +871,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="202">
<caret line="275" column="48" lean-forward="false" selection-start-line="275" selection-start-column="48" selection-end-line="275" selection-end-column="48" />
<folding />
</state>
</provider>
</entry>
......@@ -1062,7 +906,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="145">
<caret line="208" column="31" lean-forward="true" selection-start-line="208" selection-start-column="31" selection-end-line="208" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
......@@ -1092,26 +935,26 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="170">
<caret line="58" column="25" lean-forward="false" selection-start-line="58" selection-start-column="14" selection-end-line="58" selection-end-column="25" />
<state relative-caret-position="332">
<caret line="885" column="15" lean-forward="false" selection-start-line="885" selection-start-column="15" selection-end-line="885" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/models/instance.py">
<entry file="file://$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="213">
<caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="30" />
<state relative-caret-position="51">
<caret line="3" column="62" lean-forward="false" selection-start-line="3" selection-start-column="62" selection-end-line="3" selection-end-column="62" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/request/urls.py">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="446">
<caret line="58" column="32" lean-forward="false" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
<state relative-caret-position="204">
<caret line="12" column="33" lean-forward="false" selection-start-line="12" selection-start-column="33" selection-end-line="12" selection-end-column="33" />
<folding />
</state>
</provider>
......@@ -1121,59 +964,93 @@
<state relative-caret-position="116">
<caret line="68" column="17" lean-forward="false" selection-start-line="68" selection-start-column="17" selection-end-line="68" selection-end-column="17" />
<folding>
<element signature="e#732#770#0" expanded="true" />
<element signature="e#732#770#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<entry file="file://$PROJECT_DIR$/circle/request/urls.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="4">
<caret line="722" column="24" lean-forward="false" selection-start-line="722" selection-start-column="24" selection-end-line="722" selection-end-column="24" />
<state relative-caret-position="446">
<caret line="58" column="32" lean-forward="false" selection-start-line="58" selection-start-column="32" selection-end-line="58" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/operations.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="318">
<caret line="668" column="42" lean-forward="false" selection-start-line="668" selection-start-column="42" selection-end-line="668" selection-end-column="42" />
<state relative-caret-position="170">
<caret line="58" column="25" lean-forward="false" selection-start-line="58" selection-start-column="14" selection-end-line="58" selection-end-column="25" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py">
<entry file="file://$PROJECT_DIR$/circle/vm/models/instance.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="213">
<caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="30" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="310">
<caret line="1014" column="0" lean-forward="true" selection-start-line="1014" selection-start-column="0" selection-end-line="1014" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/local_periodic_tasks.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="463">
<caret line="47" column="57" lean-forward="false" selection-start-line="47" selection-start-column="57" selection-end-line="47" selection-end-column="57" />
<state relative-caret-position="306">
<caret line="45" column="8" lean-forward="false" selection-start-line="45" selection-start-column="8" selection-end-line="45" selection-end-column="54" />
<folding>
<element signature="e#0#43#0" expanded="true" />
<element signature="e#732#746#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/request/templates/request/_request-lease-form.html">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="51">
<caret line="3" column="62" lean-forward="false" selection-start-line="3" selection-start-column="62" selection-end-line="3" selection-end-column="62" />
<state relative-caret-position="134">
<caret line="168" column="8" lean-forward="true" selection-start-line="168" selection-start-column="8" selection-end-line="168" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/_vm-renew.html">
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/base.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="12" column="33" lean-forward="false" selection-start-line="12" selection-start-column="33" selection-end-line="12" selection-end-column="33" />
<state relative-caret-position="105">
<caret line="179" column="0" lean-forward="false" selection-start-line="179" selection-start-column="0" selection-end-line="179" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/operations.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-416">
<caret line="606" column="55" lean-forward="false" selection-start-line="606" selection-start-column="55" selection-end-line="606" selection-end-column="55" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/models/vm_lease.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="364">
<caret line="31" column="58" lean-forward="false" selection-start-line="31" selection-start-column="58" selection-end-line="31" selection-end-column="58" />
<state relative-caret-position="145">
<caret line="25" column="20" lean-forward="false" selection-start-line="25" selection-start-column="20" selection-end-line="25" selection-end-column="20" />
<folding>
<element signature="e#0#86#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/vm/tasks/lease_tasks.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="122">
<caret line="43" column="55" lean-forward="false" selection-start-line="43" selection-start-column="55" selection-end-line="43" selection-end-column="55" />
<folding>
<element signature="e#0#72#0" expanded="true" />
<element signature="e#0#43#0" expanded="true" />
</folding>
</state>
</provider>
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-05-16 12:49
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('vm', '0012_auto_20180515_1151'),
]
operations = [
migrations.AddField(
model_name='vmlease',
name='suspend_done',
field=models.BooleanField(default=False),
),
]
from django.db.models import Model, ForeignKey, CharField, DateTimeField
from django.db.models import Model, ForeignKey, CharField, DateTimeField, BooleanField
from django.conf import settings
from django.utils import timezone
from vm.models import Lease
......@@ -18,6 +18,7 @@ class VmLease(Model):
verbose_name=_('time of delete'),
help_text=_("Proposed time of automatic "
"deletion."))
suspend_done = BooleanField(blank=False, default=False)
def get_renew_times(self, lease=None):
"""Returns new suspend and delete times if renew would be called.
......@@ -30,7 +31,9 @@ class VmLease(Model):
def clean(self, *args, **kwargs):
self.time_of_suspend, self.time_of_delete = self.get_renew_times()
self.suspend_done = False
super(VmLease, self).clean(*args, **kwargs)
return self
def is_suspend_expiring(self, threshold=0.1):
limit = timezone.now() + timedelta(seconds=(
......
......@@ -309,6 +309,7 @@ class DeployOperation(InstanceOperation):
def _operation(self, request, node=None):
openstack_api.nova.server_start(request, self.instance.id)
VmLease.get_or_create_lease(self.instance.id).clean().save()
@register_operation
......@@ -629,14 +630,9 @@ class WakeUpOperation(InstanceOperation):
def is_preferred(self):
return self.instance.status == self.instance.STATUS.SUSPENDED
def on_abort(self, activity, error):
if isinstance(error, SchedulerError):
activity.resultant_state = None
else:
activity.resultant_state = 'ERROR'
def _operation(self, request):
openstack_api.nova.server_resume(request, self.instance.id)
VmLease.get_or_create_lease(self.instance.id).clean().save()
@register_operation
......@@ -679,6 +675,9 @@ class RenewOperation(InstanceOperation):
if save:
vm_lease.lease = lease
vm_lease.suspend_done = False
vm_lease.delete_done = False
vm_lease.save()
return create_readable(ugettext_noop(
......
from celery.decorators import periodic_task
from celery.task.schedules import crontab
from django.conf import settings
from django.utils import timezone
from openstack_auth.utils import fix_auth_url_version
from keystoneauth1.identity import v3
from keystoneauth1 import session
......@@ -38,6 +39,23 @@ def get_project_client(project):
return client.Client("2.0", session=sess)
def handle_suspend(client, server, lease):
now = timezone.now()
if now > lease.time_of_suspend and server.status == 'ACTIVE':
if lease.suspend_done:
lease.clean().save()
else:
client.servers.suspend(server)
lease.suspend_done = True
lease.save()
def handle_destroy(client, server, lease):
now = timezone.now()
if now > lease.time_of_delete:
client.servers.delete(server)
@periodic_task(run_every=crontab(hour="*", minute="*", day_of_week="*"))
def check_lease_expiration():
projects = get_projects()
......@@ -46,3 +64,5 @@ def check_lease_expiration():
servers = client.servers.list()
for server in servers:
lease = VmLease.get_or_create_lease(server.id)
handle_suspend(client, server, lease)
handle_destroy(client, server, lease)
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