Commit 7a0b9b2b by Szabolcs Gelencser

Add public network icon, ipv4 address to interfaces

parent 0cfffed4
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="1fbec8af-5a7c-40f9-b994-83ac07d1ae1d" name="Default" comment=""> <list default="true" id="1fbec8af-5a7c-40f9-b994-83ac07d1ae1d" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<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-detail/network.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/forms.py" afterPath="$PROJECT_DIR$/circle/dashboard/forms.py" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html" afterPath="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html" />
<change beforePath="$PROJECT_DIR$/circle/dashboard/views/vm.py" afterPath="$PROJECT_DIR$/circle/dashboard/views/vm.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" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" /> <option name="TRACKING_ENABLED" value="true" />
...@@ -37,61 +34,21 @@ ...@@ -37,61 +34,21 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="models.py" pinned="false" current-in-tab="false"> <file leaf-file-name="vm.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/network/models.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="556">
<caret line="100" column="60" lean-forward="true" selection-start-line="100" selection-start-column="60" selection-end-line="100" selection-end-column="60" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="vm.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py"> <entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="80"> <state relative-caret-position="284">
<caret line="1054" column="40" lean-forward="false" selection-start-line="1054" selection-start-column="12" selection-end-line="1054" selection-end-column="40" /> <caret line="167" column="51" lean-forward="false" selection-start-line="167" selection-start-column="47" selection-end-line="167" selection-end-column="51" />
<folding /> <folding />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="servers.py" pinned="false" current-in-tab="false"> <file leaf-file-name="network.html" pinned="false" current-in-tab="true">
<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/network.html">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="250"> <state relative-caret-position="187">
<caret line="734" column="37" lean-forward="true" selection-start-line="734" selection-start-column="37" selection-end-line="734" selection-end-column="37" /> <caret line="39" column="0" lean-forward="false" selection-start-line="39" selection-start-column="2" selection-end-line="39" selection-end-column="75" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="nova.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/nova.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="156">
<caret line="528" column="0" lean-forward="false" selection-start-line="528" selection-start-column="0" selection-end-line="528" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="neutron.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/openstack_api/neutron.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="359" column="8" lean-forward="false" selection-start-line="359" selection-start-column="8" selection-end-line="359" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="vm-plain-image-create.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-plain-image-create.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221">
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>
...@@ -169,7 +126,6 @@ ...@@ -169,7 +126,6 @@
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/home.html" /> <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/dashboard/templates/dashboard/vm-detail/console.html" />
<option value="$PROJECT_DIR$/circle/common/operations.py" /> <option value="$PROJECT_DIR$/circle/common/operations.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
<option value="$PROJECT_DIR$/circle/openstack_api/nova.py" /> <option value="$PROJECT_DIR$/circle/openstack_api/nova.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html" /> <option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index.html" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-templates.html" /> <option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/index-templates.html" />
...@@ -210,6 +166,7 @@ ...@@ -210,6 +166,7 @@
<option value="$PROJECT_DIR$/circle/network/models.py" /> <option value="$PROJECT_DIR$/circle/network/models.py" />
<option value="$PROJECT_DIR$/circle/dashboard/forms.py" /> <option value="$PROJECT_DIR$/circle/dashboard/forms.py" />
<option value="$PROJECT_DIR$/circle/dashboard/views/vm.py" /> <option value="$PROJECT_DIR$/circle/dashboard/views/vm.py" />
<option value="$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html" />
</list> </list>
</option> </option>
</component> </component>
...@@ -267,7 +224,7 @@ ...@@ -267,7 +224,7 @@
<foldersAlwaysOnTop value="true" /> <foldersAlwaysOnTop value="true" />
</navigator> </navigator>
<panes> <panes>
<pane id="Scope" /> <pane id="Scratches" />
<pane id="ProjectPane"> <pane id="ProjectPane">
<subPane> <subPane>
<expand> <expand>
...@@ -324,13 +281,31 @@ ...@@ -324,13 +281,31 @@
<item name="cloud" type="b2602c69:ProjectViewProjectNode" /> <item name="cloud" type="b2602c69:ProjectViewProjectNode" />
<item name="cloud" type="462c0819:PsiDirectoryNode" /> <item name="cloud" type="462c0819:PsiDirectoryNode" />
<item name="circle" type="462c0819:PsiDirectoryNode" /> <item name="circle" type="462c0819:PsiDirectoryNode" />
<item name="openstack_auth" 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" />
</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" />
</path> </path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
</pane> </pane>
<pane id="Scratches" /> <pane id="Scope" />
</panes> </panes>
</component> </component>
<component name="PropertiesComponent"> <component name="PropertiesComponent">
...@@ -484,21 +459,21 @@ ...@@ -484,21 +459,21 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-2" y="-1" width="1924" height="1063" extended-state="0" /> <frame x="-2" y="-1" width="1924" height="1063" extended-state="0" />
<editor active="true" />
<layout> <layout>
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.4978701" order="6" side_tool="false" content_ui="tabs" /> <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32980973" sideWeight="0.4978701" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.47568712" sideWeight="0.5037274" order="7" side_tool="true" 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.47568712" sideWeight="0.5037274" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32492113" sideWeight="0.50745475" 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.32492113" sideWeight="0.50745475" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.43023255" sideWeight="0.43610224" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.43023255" sideWeight="0.43610224" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769555" sideWeight="0.49574015" order="2" side_tool="false" content_ui="tabs" /> <window_info id="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.47634068" sideWeight="0.50151056" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.47568712" sideWeight="0.5037274" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1400426" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14110756" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32875264" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="SciView" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="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="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="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.47568712" sideWeight="0.49627262" 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.47568712" sideWeight="0.49627262" 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="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="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" /> <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" />
...@@ -506,6 +481,7 @@ ...@@ -506,6 +481,7 @@
<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="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="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="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="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32875264" 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="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
</layout> </layout>
<layout-to-restore> <layout-to-restore>
...@@ -584,7 +560,7 @@ ...@@ -584,7 +560,7 @@
</properties> </properties>
</breakpoint> </breakpoint>
</default-breakpoints> </default-breakpoints>
<option name="time" value="299" /> <option name="time" value="310" />
</breakpoint-manager> </breakpoint-manager>
<watches-manager /> <watches-manager />
</component> </component>
...@@ -655,74 +631,53 @@ print(r)</expression-string> ...@@ -655,74 +631,53 @@ print(r)</expression-string>
</expressions> </expressions>
<expressions id="evaluateExpression"> <expressions id="evaluateExpression">
<expression> <expression>
<expression-string>nics</expression-string> <expression-string>instance.VirtualInterfaces</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>nincs</expression-string> <expression-string>instance.virtualInterfaces</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>nic_info</expression-string> <expression-string>instance.virtualinterfaces</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>openstack_api.neutron.router_get(request, &quot;default&quot;)</expression-string> <expression-string>instance.addresses</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>openstack_api.neutron.router_get(request, None, name=&quot;default&quot;)</expression-string> <expression-string>instance.private_ip</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>quotas.get(&quot;instances&quot;)</expression-string> <expression-string>nics</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>openstack_api.nova.tenant_quota_get(self.request, user.project_id)</expression-string> <expression-string>nincs</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>openstack_api.nova.tenant_quota_get(self.request, user.project_id).instances</expression-string> <expression-string>nic_info</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
<expression> <expression>
<expression-string>openstack_api.nova.tenant_quota_get(self.request, user.project_id)[&quot;instances&quot;]</expression-string> <expression-string>openstack_api.neutron.router_get(request, &quot;default&quot;)</expression-string>
<language-id>Python</language-id> <language-id>Python</language-id>
<evaluation-mode>EXPRESSION</evaluation-mode> <evaluation-mode>EXPRESSION</evaluation-mode>
</expression> </expression>
</expressions> </expressions>
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/circle/request/views.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="352">
<caret line="51" column="7" lean-forward="true" selection-start-line="51" selection-start-column="7" selection-end-line="51" selection-end-column="7" />
</state>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/__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>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/extension.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>
</provider>
</entry>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/client.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"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="562"> <state relative-caret-position="562">
...@@ -800,7 +755,6 @@ print(r)</expression-string> ...@@ -800,7 +755,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="236"> <state relative-caret-position="236">
<caret line="155" column="54" lean-forward="false" selection-start-line="155" selection-start-column="40" selection-end-line="155" selection-end-column="54" /> <caret line="155" column="54" lean-forward="false" selection-start-line="155" selection-start-column="40" selection-end-line="155" selection-end-column="54" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -837,7 +791,6 @@ print(r)</expression-string> ...@@ -837,7 +791,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1887"> <state relative-caret-position="1887">
<caret line="122" column="0" lean-forward="false" selection-start-line="122" selection-start-column="0" selection-end-line="122" selection-end-column="0" /> <caret line="122" column="0" lean-forward="false" selection-start-line="122" selection-start-column="0" selection-end-line="122" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -889,7 +842,6 @@ print(r)</expression-string> ...@@ -889,7 +842,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="94"> <state relative-caret-position="94">
<caret line="24" column="0" lean-forward="false" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" /> <caret line="24" column="0" lean-forward="false" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -950,7 +902,6 @@ print(r)</expression-string> ...@@ -950,7 +902,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204"> <state relative-caret-position="204">
<caret line="32" column="0" lean-forward="true" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" /> <caret line="32" column="0" lean-forward="true" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -981,7 +932,6 @@ print(r)</expression-string> ...@@ -981,7 +932,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="50"> <state relative-caret-position="50">
<caret line="52" column="59" lean-forward="false" selection-start-line="52" selection-start-column="59" selection-end-line="52" selection-end-column="59" /> <caret line="52" column="59" lean-forward="false" selection-start-line="52" selection-start-column="59" selection-end-line="52" selection-end-column="59" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -996,7 +946,6 @@ print(r)</expression-string> ...@@ -996,7 +946,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="11" column="14" lean-forward="false" selection-start-line="11" selection-start-column="14" selection-end-line="11" selection-end-column="14" /> <caret line="11" column="14" lean-forward="false" selection-start-line="11" selection-start-column="14" selection-end-line="11" selection-end-column="14" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -1012,7 +961,6 @@ print(r)</expression-string> ...@@ -1012,7 +961,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="221"> <state relative-caret-position="221">
<caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" /> <caret line="13" column="0" lean-forward="false" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -1028,7 +976,6 @@ print(r)</expression-string> ...@@ -1028,7 +976,6 @@ print(r)</expression-string>
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306"> <state relative-caret-position="306">
<caret line="886" column="8" lean-forward="false" selection-start-line="886" selection-start-column="8" selection-end-line="886" selection-end-column="8" /> <caret line="886" column="8" lean-forward="false" selection-start-line="886" selection-start-column="8" selection-end-line="886" selection-end-column="8" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
...@@ -1067,15 +1014,14 @@ print(r)</expression-string> ...@@ -1067,15 +1014,14 @@ print(r)</expression-string>
<entry file="file://$USER_HOME$/.virtualenvs/cloud/local/lib/python2.7/site-packages/novaclient/v2/servers.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"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="250"> <state relative-caret-position="250">
<caret line="734" column="37" lean-forward="true" selection-start-line="734" selection-start-column="37" selection-end-line="734" selection-end-column="37" /> <caret line="734" column="37" lean-forward="false" selection-start-line="734" selection-start-column="37" selection-end-line="734" selection-end-column="37" />
<folding />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/circle/network/models.py"> <entry file="file://$PROJECT_DIR$/circle/network/models.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="556"> <state relative-caret-position="556">
<caret line="100" column="60" lean-forward="true" selection-start-line="100" selection-start-column="60" selection-end-line="100" selection-end-column="60" /> <caret line="100" column="60" lean-forward="false" selection-start-line="100" selection-start-column="60" selection-end-line="100" selection-end-column="60" />
<folding /> <folding />
</state> </state>
</provider> </provider>
...@@ -1088,10 +1034,34 @@ print(r)</expression-string> ...@@ -1088,10 +1034,34 @@ print(r)</expression-string>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/_network-port-add.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://$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="156">
<caret line="115" column="0" lean-forward="false" selection-start-line="115" selection-start-column="0" selection-end-line="115" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py"> <entry file="file://$PROJECT_DIR$/circle/dashboard/views/vm.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="80"> <state relative-caret-position="284">
<caret line="1054" column="40" lean-forward="false" selection-start-line="1054" selection-start-column="12" selection-end-line="1054" selection-end-column="40" /> <caret line="167" column="51" lean-forward="false" selection-start-line="167" selection-start-column="47" selection-end-line="167" selection-end-column="51" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/circle/dashboard/templates/dashboard/vm-detail/network.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="39" column="0" lean-forward="false" selection-start-line="39" selection-start-column="2" selection-end-line="39" selection-end-column="75" />
<folding /> <folding />
</state> </state>
</provider> </provider>
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
{% for i in networks %} {% for i in networks %}
<div> <div>
<h3 class="list-group-item-heading dashboard-vm-details-network-h3"> <h3 class="list-group-item-heading dashboard-vm-details-network-h3">
<i class="fa fa-{% if i.host %}globe{% else %}link{% endif %}"></i> <i class="fa fa-{% if i.internet_access %}globe{% else %}link{% endif %}"></i>
{{ i.name }} {{ i.name }}
{% if not i.subnets.0.enable_dhcp %}({% trans "unmanaged" %}){% endif %} {% if not i.subnet.enable_dhcp %}({% trans "unmanaged" %}){% endif %}
{% if user.is_superuser and i.host %} {% if user.is_superuser and i.host %}
<a href="{{ i.host.get_absolute_url }}" <a href="{{ i.host.get_absolute_url }}"
class="btn btn-default btn-xs">{% trans "edit" %}</a> class="btn btn-default btn-xs">{% trans "edit" %}</a>
...@@ -32,23 +32,23 @@ ...@@ -32,23 +32,23 @@
</span> </span>
{% endif %}{% endwith %} {% endif %}{% endwith %}
</h3> </h3>
{% if i.host %}
<div class="row"> <div class="row">
<div class="col-md-5"> <div class="col-md-5">
<dl> <dl>
<dt>{% trans "IPv4 address" %}:</dt> <dd>{{ i.host.ipv4 }}</dd> <dt>{% trans "IPv4 address" %}:</dt> <dd>{{ i.ipv4 }}</dd>
<dt>{% trans "IPv6 address" %}:</dt> <dd>{{ i.host.ipv6 }}</dd> {# <dt>{% trans "IPv6 address" %}:</dt> <dd>{{ i.ipv6 }}</dd>#}
<dt>{% trans "DNS name" %}:</dt> <dd>{{ i.host.get_fqdn }}</dd> {# <dt>{% trans "DNS name" %}:</dt> <dd>{{ i.host.get_fqdn }}</dd>#}
<dt>{% trans "Groups" %}:</dt> {# <dt>{% trans "Groups" %}:</dt>#}
<dd> {# <dd>#}
{% for g in i.host.groups.all %} {# {% for g in i.host.groups.all %}#}
{{ g }}{% if not forloop.last %},{% endif %} {# {{ g }}{% if not forloop.last %},{% endif %}#}
{% empty %} {# {% empty %}#}
- {# -#}
{% endfor %} {# {% endfor %}#}
</dd> {# </dd>#}
</dl> </dl>
</div> </div>
{% if i.host %}
<div class="col-md-7"> <div class="col-md-7">
<ul class="nav nav-pills pull-right"> <ul class="nav nav-pills pull-right">
<li class="active"><a href="#ipv4_{{ i.host.vlan.pk }}" data-toggle="pill" class="text-center">{% trans "IPv4" %}</a></li> <li class="active"><a href="#ipv4_{{ i.host.vlan.pk }}" data-toggle="pill" class="text-center">{% trans "IPv4" %}</a></li>
...@@ -136,7 +136,7 @@ ...@@ -136,7 +136,7 @@
{% include "dashboard/vm-detail/_network-port-add.html" %} {% include "dashboard/vm-detail/_network-port-add.html" %}
</div> </div>
</div> </div>
{% endif %}
</div> </div>
{% endif %}
</div> </div>
{% endfor %} {% endfor %}
...@@ -148,21 +148,30 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView): ...@@ -148,21 +148,30 @@ class VmDetailView(LoginRequiredMixin, GraphMixin, DetailView):
activities = openstack_api.nova.instance_action_list(self.request, instance.id) activities = openstack_api.nova.instance_action_list(self.request, instance.id)
ports = openstack_api.neutron.port_list(self.request) ports = openstack_api.neutron.port_list(self.request)
instance_ports = [p for p in ports if p.device_id == self.object.id]
instance_net_ids = [p.network_id for p in ports if p.device_id == self.object.id] instance_net_ids = [p.network_id for p in instance_ports]
all_networks = openstack_api.neutron.network_list(self.request) all_networks = openstack_api.neutron.network_list(self.request)
instance_networks = [n for n in all_networks if n.id in instance_net_ids and len(n.subnets) > 0] instance_networks = {n.id: n for n in all_networks if n.id in instance_net_ids and len(n.subnets) > 0}
router_ports = [p for p in ports if p.device_owner == 'network:router_interface'] router_ports = [p for p in ports if p.device_owner == 'network:router_interface']
routers = openstack_api.neutron.router_list(self.request) routers = openstack_api.neutron.router_list(self.request)
router_by_id = {r.id: r for r in routers} router_by_id = {r.id: r for r in routers}
for n in instance_networks: # mark networks with internet access
n.subnet = n.subnets[0] for rtr_port in router_ports:
#TODO: mark network public if it is based on router ports and router if router_by_id[rtr_port.device_id].external_gateway_info is not None \
and rtr_port.network_id in instance_networks.keys():
instance_networks[rtr_port.network_id].internet_access = True
for port in instance_ports:
instance_networks[port.network_id].ipv4 = port.fixed_ips[0]['ip_address']
# set default subnets for networks
for id in instance_networks:
instance_networks[id].subnet = instance_networks[id].subnets[0]
context['networks'] = instance_networks context['networks'] = instance_networks.values()
# context['vlans'] = Vlan.get_objects_with_level( # context['vlans'] = Vlan.get_objects_with_level(
# 'user', self.request.user # 'user', self.request.user
......
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