mirror of https://github.com/apache/cloudstack.git
Merge branch 'master' into ui-vpc-redesign
This commit is contained in:
commit
f52a833f4e
|
|
@ -32,7 +32,7 @@ public interface RemoteAccessVpnService {
|
|||
|
||||
RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String ipRange, boolean openFirewall, long networkId)
|
||||
throws NetworkRuleConflictException;
|
||||
void destroyRemoteAccessVpn(long vpnServerAddressId, Account caller) throws ResourceUnavailableException;
|
||||
void destroyRemoteAccessVpnForIp(long vpnServerAddressId, Account caller) throws ResourceUnavailableException;
|
||||
RemoteAccessVpn startRemoteAccessVpn(long vpnServerAddressId, boolean openFirewall) throws ResourceUnavailableException;
|
||||
|
||||
VpnUser addVpnUser(long vpnOwnerId, String userName, String password);
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
|
|||
UserContext.current().setEventDetails("Ip Id: " + getIpAddressId());
|
||||
boolean result = false;
|
||||
if (!isPortable(id)) {
|
||||
_networkService.releaseIpAddress(getIpAddressId());
|
||||
result = _networkService.releaseIpAddress(getIpAddressId());
|
||||
} else {
|
||||
_networkService.releaseIpAddress(getIpAddressId());
|
||||
result = _networkService.releaseIpAddress(getIpAddressId());
|
||||
}
|
||||
if (result) {
|
||||
SuccessResponse response = new SuccessResponse(getCommandName());
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class DeleteRemoteAccessVpnCmd extends BaseAsyncCmd {
|
|||
|
||||
@Override
|
||||
public void execute() throws ResourceUnavailableException {
|
||||
_ravService.destroyRemoteAccessVpn(publicIpId, UserContext.current().getCaller());
|
||||
_ravService.destroyRemoteAccessVpnForIp(publicIpId, UserContext.current().getCaller());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@
|
|||
<ref bean="FirstFitPlanner" />
|
||||
<ref bean="UserDispersingPlanner" />
|
||||
<ref bean="UserConcentratedPodPlanner" />
|
||||
|
||||
<ref bean="ImplicitDedicationPlanner" />
|
||||
<!--
|
||||
<ref bean="BareMetalPlanner" />
|
||||
-->
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ build: build-indep
|
|||
build-indep: build-indep-stamp
|
||||
|
||||
build-indep-stamp: configure
|
||||
mvn package -Pawsapi -DskipTests -Dsystemvm \
|
||||
mvn clean package -Pawsapi -DskipTests -Dsystemvm \
|
||||
-Dcs.replace.properties=replace.properties.tmp \
|
||||
${ACS_BUILD_OPTS}
|
||||
touch $@
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
</bookinfo>
|
||||
<xi:include href="plugin-niciranvp-about.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="plugin-niciranvp-usage.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="plugin-niciranvp-vpc.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-troubleshooting.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="plugin-niciranvp-revisions.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
</book>
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 102 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
|
|
|
|||
|
|
@ -21,27 +21,15 @@
|
|||
under the License.
|
||||
-->
|
||||
<section id="Device-management">
|
||||
<title>Device-management</title>
|
||||
<para>In &PRODUCT; 4.0.x each Nicira NVP setup is considered a "device" that can be added and removed from a physical network. To complete the configuration of the Nicira NVP plugin a device needs to be added to the physical network using the "addNiciraNVPDevice" API call. The plugin is now enabled on the physical network and any guest networks created on that network will be provisioned using the Nicira NVP Controller.</para>
|
||||
<para>The plugin introduces a set of new API calls to manage the devices, see below or refer to the API reference.</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>addNiciraNvpDevice</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>physicalnetworkid: the UUID of the physical network on which the device is configured</para></listitem>
|
||||
<listitem><para>hostname: the IP address of the NVP controller</para></listitem>
|
||||
<listitem><para>username: the username for access to the NVP API</para></listitem>
|
||||
<listitem><para>password: the password for access to the NVP API</para></listitem>
|
||||
<listitem><para>transportzoneuuid: the UUID of the transportzone</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem><para>deleteNiciraNVPDevice</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>nvpdeviceid: the UUID of the device</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem><para>listNiciraNVPDevices</para></listitem>
|
||||
</itemizedlist>
|
||||
<title>Device Management</title>
|
||||
<para>In &PRODUCT; a Nicira NVP setup is considered a "device" that can be added and removed from a physical network. To complete the configuration of the Nicira NVP plugin a device needs to be added to the physical network. Press the "Add NVP Controller" button on the provider panel and enter the configuration details.</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/nvp-add-controller.png" />
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>nvp-physical-network-stt.png: a screenshot of the device configuration popup.</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -22,12 +22,63 @@
|
|||
-->
|
||||
<section id="Features-of-the-Nicira-NVP-Plugin">
|
||||
<title>Features of the Nicira NVP Plugin</title>
|
||||
<para>In &PRODUCT; release 4.0.0-incubating this plugin supports the Connectivity service. This service is responsible for creating Layer 2 networks supporting the networks created by Guests. In other words when an tenant creates a new network, instead of the traditional VLAN a logical network will be created by sending the appropriate calls to the Nicira NVP Controller.</para>
|
||||
<para>The plugin has been tested with Nicira NVP versions 2.1.0, 2.2.0 and 2.2.1</para>
|
||||
<note><para>In &PRODUCT; 4.0.0-incubating only the XenServer hypervisor is supported for use in
|
||||
combination with Nicira NVP.</para>
|
||||
<para>In &PRODUCT; 4.1.0-incubating both KVM and XenServer hypervisors are
|
||||
supported.</para></note>
|
||||
<note><para>In &PRODUCT; 4.0.0-incubating the UI components for this plugin are not complete,
|
||||
configuration is done by sending commands to the API.</para></note>
|
||||
<para>The following table lists the CloudStack network services provided by the Nicira NVP Plugin.</para>
|
||||
<table>
|
||||
<title>Supported Services</title>
|
||||
<tgroup cols="3">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Network Service</entry>
|
||||
<entry>CloudStack version</entry>
|
||||
<entry>NVP version</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>Virtual Networking</entry>
|
||||
<entry>>= 4.0</entry>
|
||||
<entry>>= 2.2.1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Source NAT</entry>
|
||||
<entry>>= 4.1</entry>
|
||||
<entry>>= 3.0.1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Static NAT</entry>
|
||||
<entry>>= 4.1</entry>
|
||||
<entry>>= 3.0.1</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Port Forwarding</entry>
|
||||
<entry>>= 4.1</entry>
|
||||
<entry>>= 3.0.1</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<note><para>The Virtual Networking service was originally called 'Connectivity' in CloudStack 4.0</para></note>
|
||||
<para>The following hypervisors are supported by the Nicira NVP Plugin.</para>
|
||||
<table>
|
||||
<title>Supported Hypervisors</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Hypervisor</entry>
|
||||
<entry>CloudStack version</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>XenServer</entry>
|
||||
<entry>>= 4.0</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>KVM</entry>
|
||||
<entry>>= 4.1</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<note><para>Please refer to the Nicira NVP configuration guide on how to prepare the hypervisors for Nicira NVP integration.</para></note>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -22,5 +22,8 @@
|
|||
-->
|
||||
<section id="Introduction-to-the-Nicira-NVP-Plugin">
|
||||
<title>Introduction to the Nicira NVP Plugin</title>
|
||||
<para>The Nicira NVP plugin allows CloudStack to use the Nicira solution for virtualized network as a provider for CloudStack networks and services.</para>
|
||||
<para>The Nicira NVP plugin adds Nicira NVP as one of the available SDN implementations in
|
||||
CloudStack. With the plugin an exisiting Nicira NVP setup can be used by CloudStack to
|
||||
implement isolated guest networks and to provide additional services like routing and
|
||||
NAT.</para>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,131 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<section id="network-offerings">
|
||||
<title>Network Offerings</title>
|
||||
<para>Using the Nicira NVP plugin requires a network offering with Virtual Networking enabled and configured to use the NiciraNvp element. Typical use cases combine services from the Virtual Router appliance and the Nicira NVP plugin.</para>
|
||||
<table>
|
||||
<title>Isolated network offering with regular services from the Virtual Router.</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Service</entry>
|
||||
<entry>Provider</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>VPN</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DHCP</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DNS</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Firewall</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Load Balancer</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>User Data</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Source NAT</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Static NAT</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Post Forwarding</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Virtual Networking</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/nvp-network-offering.png" />
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>nvp-physical-network-stt.png: a screenshot of a network offering.</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<note><para>The tag in the network offering should be set to the name of the physical network with the NVP provider.</para></note>
|
||||
<para>Isolated network with network services. The virtual router is still required to provide network services like dns and dhcp.</para>
|
||||
<table>
|
||||
<title>Isolated network offering with network services</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Service</entry>
|
||||
<entry>Provider</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>DHCP</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DNS</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>User Data</entry>
|
||||
<entry>VirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Source NAT</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Static NAT</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Post Forwarding</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Virtual Networking</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<section id="zone-configuration">
|
||||
<title>Zone Configuration</title>
|
||||
<para>&PRODUCT; needs to have at least one physical network with the isolation method set to "STT". This network should be enabled for the Guest traffic type.</para>
|
||||
<note><para>The Guest traffic type should be configured with the traffic label that matches the name of
|
||||
the Integration Bridge on the hypervisor. See the Nicira NVP User Guide for more details
|
||||
on how to set this up in XenServer or KVM.</para></note>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/nvp-physical-network-stt.png" />
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>nvp-physical-network-stt.png: a screenshot of a physical network with the STT isolation type</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
</section>
|
||||
|
|
@ -22,17 +22,16 @@
|
|||
-->
|
||||
<section id="Prerequisites">
|
||||
<title>Prerequisites</title>
|
||||
<para>Before enabling the Nicira NVP plugin the NVP Controller needs to be configured. Please review the NVP User Guide on how to do that. </para>
|
||||
<para>&PRODUCT; needs to have at least one physical network with the isolation method set to "STT". This network should be enabled for the Guest traffic type.</para>
|
||||
<note><para>The Guest traffic type should be configured with the traffic label that matches the name of
|
||||
the Integration Bridge on the hypervisor. See the Nicira NVP User Guide for more details
|
||||
on how to set this up in XenServer or KVM.</para></note>
|
||||
<para>Before enabling the Nicira NVP plugin the NVP Controller needs to be configured. Please review the NVP User Guide on how to do that.</para>
|
||||
<para>Make sure you have the following information ready:</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>The IP address of the NVP Controller</para></listitem>
|
||||
<listitem><para>The username to access the API</para></listitem>
|
||||
<listitem><para>The password to access the API</para></listitem>
|
||||
<listitem><para>The UUID of the Transport Zone that contains the hypervisors in this Zone</para></listitem>
|
||||
<listitem><para>The UUID of the Physical Network that will be used for the Guest networks</para></listitem>
|
||||
<listitem>
|
||||
<para>The UUID of the Gateway Service used to provide router and NAT services.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<note><para>The gateway service uuid is optional and is used for Layer 3 services only (SourceNat, StaticNat and PortForwarding)</para></note>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -22,21 +22,15 @@
|
|||
-->
|
||||
<section id="Enabling-the-service-provider">
|
||||
<title>Enabling the service provider</title>
|
||||
<para>To allow CloudStack to use the Nicira NVP Plugin the network service provider needs to be enabled on the physical network. The following sequence of API calls will enable the network service provider</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>addNetworkServiceProvider</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>name = "NiciraNvp"</para></listitem>
|
||||
<listitem><para>physicalnetworkid = <the uuid of the physical network></para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
<listitem><para>updateNetworkServiceProvider</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>id = <the provider uuid returned by the previous call></para></listitem>
|
||||
<listitem><para>state = "Enabled"</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<para>The Nicira NVP provider is disabled by default. Navigate to the "Network Service Providers" configuration of the physical network with the STT isolation type. Navigate to the Nicira NVP provider and press the "Enable Provider" button.</para>
|
||||
<note><para>CloudStack 4.0 does not have the UI interface to configure the Nicira NVP plugin. Configuration needs to be done using the API directly.</para></note>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/nvp-enable-provider.png" />
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>nvp-physical-network-stt.png: a screenshot of an enabled Nicira NVP provider</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
|
||||
</section>
|
||||
|
|
@ -40,6 +40,20 @@
|
|||
</simplelist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
<revision>
|
||||
<revnumber>1-0</revnumber>
|
||||
<date>Wed May 22 2013</date>
|
||||
<author>
|
||||
<firstname>Hugo</firstname>
|
||||
<surname>Trippaers</surname>
|
||||
<email>hugo@apache.org</email>
|
||||
</author>
|
||||
<revdescription>
|
||||
<simplelist>
|
||||
<member>Documentation updated for &PRODUCT; 4.1.0</member>
|
||||
</simplelist>
|
||||
</revdescription>
|
||||
</revision>
|
||||
</revhistory>
|
||||
</simpara>
|
||||
</appendix>
|
||||
|
|
|
|||
|
|
@ -23,29 +23,84 @@
|
|||
<section id="Database-tables">
|
||||
<title>Database tables</title>
|
||||
<para>The following tables are added to the cloud database for the Nicira NVP Plugin</para>
|
||||
<itemizedlist>
|
||||
<listitem><para>nicira_nvp_nic_map, contains a mapping from nic to logical switch port</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>id</para></listitem>
|
||||
<listitem><para>logicalswitch, uuid of the logical switch this port is connected to</para></listitem>
|
||||
<listitem><para>logicalswitchport, uuid of the logical switch port for this nic</para></listitem>
|
||||
<listitem><para>nic, the CloudStack uuid for this nic, reference to the nics table</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
<itemizedlist>
|
||||
<listitem><para>external_nicira_nvp_devices, contains all configured devices</para></listitem>
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<listitem><para>id</para></listitem>
|
||||
<listitem><para>uuid</para></listitem>
|
||||
<listitem><para>physical_network_id, the physical network this device is configured on</para></listitem>
|
||||
<listitem><para>provider_name, set to "NiciraNvp"</para></listitem>
|
||||
<listitem><para>device_name, display name for this device</para></listitem>
|
||||
<listitem><para>host_id, reference to the host table with the device configuration</para></listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<table>
|
||||
<title>nicira_nvp_nic_map</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>id</entry>
|
||||
<entry>auto incrementing id</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>logicalswitch</entry>
|
||||
<entry>uuid of the logical switch this port is connected to</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>logicalswitchport</entry>
|
||||
<entry>uuid of the logical switch port for this nic</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>nic</entry>
|
||||
<entry>the &PRODUCT; uuid for this nic, reference to the nics table</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<title>external_nicira_nvp_devices</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>id</entry>
|
||||
<entry>auto incrementing id</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>uuid</entry>
|
||||
<entry>UUID identifying this device</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>physical_network_id</entry>
|
||||
<entry>the physical network this device is configured on</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>provider_name</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>device_name</entry>
|
||||
<entry>display name for this device</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>host_id</entry>
|
||||
<entry>reference to the host table with the device configuration</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<title>nicira_nvp_router_map</title>
|
||||
<tgroup cols="2">
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>id</entry>
|
||||
<entry>auto incrementing id</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>logicalrouter_uuid</entry>
|
||||
<entry>uuid of the logical router</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>network_id</entry>
|
||||
<entry>id of the network this router is linked to</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
<note>
|
||||
<para>nicira_nvp_router_map is only available in &PRODUCT; 4.1 and above</para>
|
||||
</note>
|
||||
|
||||
</section>
|
||||
|
|
@ -21,10 +21,13 @@
|
|||
under the License.
|
||||
-->
|
||||
<chapter id="Using-the-Nicira-NVP-Plugin" >
|
||||
<title>Using the Nicira NVP Plugin</title>
|
||||
<title>Configuring the Nicira NVP Plugin</title>
|
||||
|
||||
<xi:include href="plugin-niciranvp-preparations.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-ui.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-provider.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-devicemanagement.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-physicalnet.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-provider.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="plugin-niciranvp-devicemanagement.xml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
<xi:include href="plugin-niciranvp-networkofferings.xml"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||
</chapter>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
|
|
@ -13,9 +12,7 @@
|
|||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
|
|
@ -23,9 +20,11 @@
|
|||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<chapter id="niciranvp-plugin-guide">
|
||||
<title>Plugin Guide for the Nicira NVP Plugin</title>
|
||||
<xi:include href="plugin-niciranvp-about.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="plugin-niciranvp-usage.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<xi:include href="plugin-niciranvp-troubleshooting.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
<chapter id="Using-the-Nicira-NVP-Plugin-With_VPC" >
|
||||
<title>Using the Nicira NVP plugin with VPC</title>
|
||||
|
||||
<xi:include href="plugin-niciranvp-vpcfeatures.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-vpcoffering.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
<xi:include href="plugin-niciranvp-vpcnetworkoffering.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
|
||||
|
||||
</chapter>
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<section id="vpc-features">
|
||||
<title>Supported VPC features</title>
|
||||
<para>The Nicira NVP plugin supports &PRODUCT; VPC to a certain extent. Starting with &PRODUCT; version 4.1 VPCs can be deployed using NVP isolated networks.</para>
|
||||
<para>It is not possible to use a Nicira NVP Logical Router for as a VPC Router</para>
|
||||
<para>It is not possible to connect a private gateway using a Nicira NVP Logical Switch</para>
|
||||
</section>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<section id="nvp-vpc-network-offering">
|
||||
<title>VPC Network Offerings</title>
|
||||
<para>The VPC needs specific network offerings with the VPC flag enabled. Otherwise these network offerings are identical to regular network offerings. To allow VPC networks with a Nicira NVP isolated network the offerings need to support the Virtual Networking service with the NiciraNVP provider.</para>
|
||||
<para>In a typical configuration two network offerings need to be created. One with the loadbalancing service enabled and one without loadbalancing.</para>
|
||||
<table>
|
||||
<title>VPC Network Offering with Loadbalancing</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Service</entry>
|
||||
<entry>Provider</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>VPN</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DHCP</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>DNS</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Load Balancer</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>User Data</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Source NAT</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Static NAT</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Post Forwarding</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>NetworkACL</entry>
|
||||
<entry>VpcVirtualRouter</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>Virtual Networking</entry>
|
||||
<entry>NiciraNVP</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
</section>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
<!ENTITY % BOOK_ENTITIES SYSTEM "cloudstack.ent">
|
||||
%BOOK_ENTITIES;
|
||||
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
|
||||
%xinclude;
|
||||
]>
|
||||
<!-- Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0.
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
<section id="nvp-vpc-offering">
|
||||
<title>VPC Offering with Nicira NVP</title>
|
||||
<para>To allow a VPC to use the Nicira NVP plugin to provision networks, a new VPC offering needs to be created which allows the Virtual Networking service to be implemented by NiciraNVP.</para>
|
||||
<para>This is not currently possible with the UI. The API does provide the proper calls to create a VPC offering with Virtual Networking enabled. However due to a limitation in the 4.1 API it is not possible to select the provider for this network service. To configure the VPC offering with the NiciraNVP provider edit the database table 'vpc_offering_service_map' and change the provider to NiciraNvp for the service 'Connectivity'</para>
|
||||
<para>It is also possible to update the default VPC offering by adding a row to the
|
||||
'vpc_offering_service_map' with service 'Connectivity' and provider 'NiciraNvp'</para>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="./images/nvp-vpc-offering-edit.png" />
|
||||
</imageobject>
|
||||
<textobject>
|
||||
<phrase>nvp-physical-network-stt.png: a screenshot of the mysql table.</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<note><para>When creating a new VPC offering please note that the UI does not allow you to select a VPC offering yet. The VPC needs to be created using the API with the offering UUID.</para></note>
|
||||
</section>
|
||||
|
|
@ -75,6 +75,7 @@ public class Upgrade410to420 implements DbUpgrade {
|
|||
updateNetworkACLs(conn);
|
||||
addHostDetailsIndex(conn);
|
||||
updateNetworksForPrivateGateways(conn);
|
||||
removeFirewallServiceFromSharedNetworkOfferingWithSGService(conn);
|
||||
}
|
||||
|
||||
private void updateSystemVmTemplates(Connection conn) {
|
||||
|
|
@ -747,4 +748,35 @@ public class Upgrade410to420 implements DbUpgrade {
|
|||
throw new CloudRuntimeException("Failed to update private networks with VPC id.", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void removeFirewallServiceFromSharedNetworkOfferingWithSGService(Connection conn) {
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
pstmt = conn.prepareStatement("select id from `cloud`.`network_offerings` where unique_name='DefaultSharedNetworkOfferingWithSGService'");
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
long id = rs.getLong(1);
|
||||
// remove Firewall service for SG shared network offering
|
||||
pstmt = conn.prepareStatement("DELETE `cloud`.`ntwk_offering_service_map` where network_offering_id=? and service='Firewall'");
|
||||
pstmt.setLong(1, id);
|
||||
pstmt.executeUpdate();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
throw new CloudRuntimeException("Unable to remove Firewall service for SG shared network offering.", e);
|
||||
} finally {
|
||||
try {
|
||||
if (rs != null) {
|
||||
rs.close();
|
||||
}
|
||||
|
||||
if (pstmt != null) {
|
||||
pstmt.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2619,8 +2619,7 @@ ServerResource {
|
|||
Domain vms = null;
|
||||
while (retry-- > 0) {
|
||||
try {
|
||||
vms = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
vms = conn.domainLookupByName(vmName);
|
||||
State s = convertToState(vms.getInfo().state);
|
||||
return s;
|
||||
} catch (final LibvirtException e) {
|
||||
|
|
@ -2712,8 +2711,7 @@ ServerResource {
|
|||
try {
|
||||
conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName());
|
||||
ifaces = getInterfaces(conn, vmName);
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
dconn = new Connect("qemu+tcp://" + cmd.getDestinationIp()
|
||||
+ "/system");
|
||||
/*
|
||||
|
|
@ -2728,6 +2726,9 @@ ServerResource {
|
|||
} finally {
|
||||
try {
|
||||
if (dm != null) {
|
||||
if (dm.isPersistent() == 1) {
|
||||
dm.undefine();
|
||||
}
|
||||
dm.free();
|
||||
}
|
||||
if (dconn != null) {
|
||||
|
|
@ -3159,8 +3160,7 @@ ServerResource {
|
|||
protected LibvirtVMDef createVMFromSpec(VirtualMachineTO vmTO) {
|
||||
LibvirtVMDef vm = new LibvirtVMDef();
|
||||
vm.setDomainName(vmTO.getName());
|
||||
vm.setDomUUID(UUID.nameUUIDFromBytes(vmTO.getName().getBytes())
|
||||
.toString());
|
||||
vm.setDomUUID(vmTO.getUuid());
|
||||
vm.setDomDescription(vmTO.getOs());
|
||||
|
||||
GuestDef guest = new GuestDef();
|
||||
|
|
@ -3584,8 +3584,7 @@ ServerResource {
|
|||
KVMStoragePool attachingPool = attachingDisk.getPool();
|
||||
try {
|
||||
if (!attach) {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
|
||||
String xml = dm.getXMLDesc(0);
|
||||
parser.parseDomainXML(xml);
|
||||
|
|
@ -3634,9 +3633,7 @@ ServerResource {
|
|||
InternalErrorException {
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes((vmName
|
||||
.getBytes())));
|
||||
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
if (attach) {
|
||||
s_logger.debug("Attaching device: " + xml);
|
||||
dm.attachDevice(xml);
|
||||
|
|
@ -3867,8 +3864,7 @@ ServerResource {
|
|||
for (; i < 5; i++) {
|
||||
try {
|
||||
Connect conn = LibvirtConnection.getConnectionByVmName(vm);
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vm
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vm);
|
||||
DomainInfo.DomainState vps = dm.getInfo().state;
|
||||
if (vps != null
|
||||
&& vps != DomainInfo.DomainState.VIR_DOMAIN_SHUTOFF
|
||||
|
|
@ -4005,8 +4001,7 @@ ServerResource {
|
|||
for (int i = 0; i < vms.length; i++) {
|
||||
try {
|
||||
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vms[i]
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vms[i]);
|
||||
|
||||
DomainInfo.DomainState ps = dm.getInfo().state;
|
||||
final State state = convertToState(ps);
|
||||
|
|
@ -4111,8 +4106,7 @@ ServerResource {
|
|||
Domain dm = null;
|
||||
String msg = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
String vmDef = dm.getXMLDesc(0);
|
||||
s_logger.debug(vmDef);
|
||||
msg = stopVM(conn, vmName);
|
||||
|
|
@ -4154,8 +4148,7 @@ ServerResource {
|
|||
/* Retry 3 times, to make sure we can get the vm's status */
|
||||
for (int i = 0; i < 3; i++) {
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
state = dm.getInfo().state;
|
||||
break;
|
||||
} catch (LibvirtException e) {
|
||||
|
|
@ -4191,8 +4184,7 @@ ServerResource {
|
|||
protected String stopVM(Connect conn, String vmName, boolean force) {
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
int persist = dm.isPersistent();
|
||||
if (force) {
|
||||
if (dm.isActive() == 1) {
|
||||
|
|
@ -4279,8 +4271,7 @@ ServerResource {
|
|||
LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
String xmlDesc = dm.getXMLDesc(0);
|
||||
parser.parseDomainXML(xmlDesc);
|
||||
return parser.getVncPort();
|
||||
|
|
@ -4325,8 +4316,7 @@ ServerResource {
|
|||
LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
String xmlDesc = dm.getXMLDesc(0);
|
||||
parser.parseDomainXML(xmlDesc);
|
||||
return parser.getDescription();
|
||||
|
|
@ -4424,15 +4414,14 @@ ServerResource {
|
|||
private Domain getDomain(Connect conn, String vmName)
|
||||
throws LibvirtException {
|
||||
return conn
|
||||
.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName.getBytes()));
|
||||
.domainLookupByName(vmName);
|
||||
}
|
||||
|
||||
protected List<InterfaceDef> getInterfaces(Connect conn, String vmName) {
|
||||
LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
parser.parseDomainXML(dm.getXMLDesc(0));
|
||||
return parser.getInterfaces();
|
||||
|
||||
|
|
@ -4454,8 +4443,7 @@ ServerResource {
|
|||
LibvirtDomainXMLParser parser = new LibvirtDomainXMLParser();
|
||||
Domain dm = null;
|
||||
try {
|
||||
dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName
|
||||
.getBytes()));
|
||||
dm = conn.domainLookupByName(vmName);
|
||||
parser.parseDomainXML(dm.getXMLDesc(0));
|
||||
return parser.getDisks();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public class LibvirtComputingResourceTest {
|
|||
LibvirtComputingResource lcr = new LibvirtComputingResource();
|
||||
VirtualMachineTO to = new VirtualMachineTO(id, name, VirtualMachine.Type.User, cpus, speed, minRam, maxRam, BootloaderType.HVM, os, false, false, vncPassword);
|
||||
to.setVncAddr(vncAddr);
|
||||
to.setUuid("b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9");
|
||||
|
||||
LibvirtVMDef vm = lcr.createVMFromSpec(to);
|
||||
vm.setHvsType(_hyperVisorType);
|
||||
|
|
@ -135,6 +136,7 @@ public class LibvirtComputingResourceTest {
|
|||
LibvirtComputingResource lcr = new LibvirtComputingResource();
|
||||
VirtualMachineTO to = new VirtualMachineTO(id, name, VirtualMachine.Type.User, cpus, minSpeed, maxSpeed, minRam, maxRam, BootloaderType.HVM, os, false, false, vncPassword);
|
||||
to.setVncAddr(vncAddr);
|
||||
to.setUuid("b0f0a72d-7efb-3cad-a8ff-70ebf30b3af9");
|
||||
|
||||
LibvirtVMDef vm = lcr.createVMFromSpec(to);
|
||||
vm.setHvsType(_hyperVisorType);
|
||||
|
|
@ -181,4 +183,4 @@ public class LibvirtComputingResourceTest {
|
|||
|
||||
assertEquals(vmStr, vm.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1095,7 +1095,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
|
|||
}
|
||||
|
||||
if (networkId != null) {
|
||||
sc.setJoinParameters("nicSearch", "networkId", networkId);
|
||||
sc.setParameters("networkId", networkId);
|
||||
}
|
||||
|
||||
if (vpcId != null) {
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
|
||||
if (planner instanceof DeploymentClusterPlanner) {
|
||||
|
||||
ExcludeList PlannerAvoidInput = new ExcludeList(avoids.getDataCentersToAvoid(),
|
||||
ExcludeList plannerAvoidInput = new ExcludeList(avoids.getDataCentersToAvoid(),
|
||||
avoids.getPodsToAvoid(), avoids.getClustersToAvoid(), avoids.getHostsToAvoid(),
|
||||
avoids.getPoolsToAvoid());
|
||||
|
||||
|
|
@ -388,19 +388,19 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
|
||||
if (clusterList != null && !clusterList.isEmpty()) {
|
||||
// planner refactoring. call allocators to list hosts
|
||||
ExcludeList PlannerAvoidOutput = new ExcludeList(avoids.getDataCentersToAvoid(),
|
||||
ExcludeList plannerAvoidOutput = new ExcludeList(avoids.getDataCentersToAvoid(),
|
||||
avoids.getPodsToAvoid(), avoids.getClustersToAvoid(), avoids.getHostsToAvoid(),
|
||||
avoids.getPoolsToAvoid());
|
||||
|
||||
resetAvoidSet(PlannerAvoidOutput, PlannerAvoidInput);
|
||||
resetAvoidSet(plannerAvoidOutput, plannerAvoidInput);
|
||||
|
||||
dest = checkClustersforDestination(clusterList, vmProfile, plan, avoids, dc,
|
||||
getPlannerUsage(planner), PlannerAvoidOutput);
|
||||
getPlannerUsage(planner), plannerAvoidOutput);
|
||||
if (dest != null) {
|
||||
return dest;
|
||||
}
|
||||
// reset the avoid input to the planners
|
||||
resetAvoidSet(avoids, PlannerAvoidOutput);
|
||||
resetAvoidSet(avoids, plannerAvoidOutput);
|
||||
|
||||
} else {
|
||||
return null;
|
||||
|
|
@ -815,12 +815,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
|
||||
// remove any hosts/pools that the planners might have added
|
||||
// to get the list of hosts/pools that Allocators flagged as 'avoid'
|
||||
if (allocatorAvoidOutput.getHostsToAvoid() != null && plannerAvoidOutput.getHostsToAvoid() != null) {
|
||||
allocatorAvoidOutput.getHostsToAvoid().removeAll(plannerAvoidOutput.getHostsToAvoid());
|
||||
}
|
||||
if (allocatorAvoidOutput.getPoolsToAvoid() != null && plannerAvoidOutput.getPoolsToAvoid() != null) {
|
||||
allocatorAvoidOutput.getPoolsToAvoid().removeAll(plannerAvoidOutput.getPoolsToAvoid());
|
||||
}
|
||||
|
||||
resetAvoidSet(allocatorAvoidOutput, plannerAvoidOutput);
|
||||
|
||||
// if all hosts or all pools in the cluster are in avoid set after this
|
||||
// pass, then put the cluster in avoid set.
|
||||
|
|
@ -829,8 +825,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
List<HostVO> allhostsInCluster = _hostDao.listAllUpAndEnabledNonHAHosts(Host.Type.Routing, clusterVO.getId(),
|
||||
clusterVO.getPodId(), clusterVO.getDataCenterId(), null);
|
||||
for (HostVO host : allhostsInCluster) {
|
||||
if (allocatorAvoidOutput.getHostsToAvoid() == null
|
||||
|| !allocatorAvoidOutput.getHostsToAvoid().contains(host.getId())) {
|
||||
if (!allocatorAvoidOutput.shouldAvoid(host)) {
|
||||
// there's some host in the cluster that is not yet in avoid set
|
||||
avoidAllHosts = false;
|
||||
}
|
||||
|
|
@ -839,8 +834,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy
|
|||
List<StoragePoolVO> allPoolsInCluster = _storagePoolDao.findPoolsByTags(clusterVO.getDataCenterId(),
|
||||
clusterVO.getPodId(), clusterVO.getId(), null);
|
||||
for (StoragePoolVO pool : allPoolsInCluster) {
|
||||
if (allocatorAvoidOutput.getPoolsToAvoid() == null
|
||||
|| !allocatorAvoidOutput.getPoolsToAvoid().contains(pool.getId())) {
|
||||
if (!allocatorAvoidOutput.shouldAvoid(pool)) {
|
||||
// there's some pool in the cluster that is not yet in avoid set
|
||||
avoidAllPools = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3273,7 +3273,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
|
|||
// the code would be triggered
|
||||
s_logger.debug("Cleaning up remote access vpns as a part of public IP id=" + ipId + " release...");
|
||||
try {
|
||||
_vpnMgr.destroyRemoteAccessVpn(ipId, caller);
|
||||
_vpnMgr.destroyRemoteAccessVpnForIp(ipId, caller);
|
||||
} catch (ResourceUnavailableException e) {
|
||||
s_logger.warn("Unable to destroy remote access vpn for ip id=" + ipId + " as a part of ip release", e);
|
||||
success = false;
|
||||
|
|
|
|||
|
|
@ -226,10 +226,10 @@ public class RemoteAccessVpnManagerImpl extends ManagerBase implements RemoteAcc
|
|||
}
|
||||
|
||||
@Override @DB
|
||||
public void destroyRemoteAccessVpn(long ipId, Account caller) throws ResourceUnavailableException {
|
||||
public void destroyRemoteAccessVpnForIp(long ipId, Account caller) throws ResourceUnavailableException {
|
||||
RemoteAccessVpnVO vpn = _remoteAccessVpnDao.findByPublicIpAddress(ipId);
|
||||
if (vpn == null) {
|
||||
s_logger.debug("vpn id=" + ipId + " does not exists ");
|
||||
s_logger.debug("there are no Remote access vpns for public ip address id=" + ipId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -628,7 +628,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
|
||||
try {
|
||||
for (RemoteAccessVpnVO vpn : remoteAccessVpns) {
|
||||
_remoteAccessVpnMgr.destroyRemoteAccessVpn(vpn.getServerAddressId(), caller);
|
||||
_remoteAccessVpnMgr.destroyRemoteAccessVpnForIp(vpn.getServerAddressId(), caller);
|
||||
}
|
||||
} catch (ResourceUnavailableException ex) {
|
||||
s_logger.warn("Failed to cleanup remote access vpn resources as a part of account id=" + accountId + " cleanup due to Exception: ", ex);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ ALTER TABLE `cloud`.`account` ADD COLUMN `default_zone_id` bigint unsigned;
|
|||
ALTER TABLE `cloud`.`account` ADD CONSTRAINT `fk_account__default_zone_id` FOREIGN KEY `fk_account__default_zone_id`(`default_zone_id`) REFERENCES `data_center`(`id`) ON DELETE CASCADE;
|
||||
|
||||
|
||||
DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
|
||||
DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM `cloud`.`storage_pool` WHERE removed IS NOT NULL);
|
||||
|
||||
DROP TABLE IF EXISTS `cloud`.`cluster_vsm_map`;
|
||||
DROP TABLE IF EXISTS `cloud`.`virtual_supervisor_module`;
|
||||
|
|
@ -179,14 +179,14 @@ CREATE TABLE `cloud`.`port_profile` (
|
|||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM storage_pool WHERE removed IS NOT NULL);
|
||||
DELETE FROM `cloud`.`storage_pool_host_ref` WHERE pool_id IN (SELECT id FROM `cloud`.`storage_pool` WHERE removed IS NOT NULL);
|
||||
|
||||
ALTER TABLE `cloud`.`service_offering` MODIFY `nw_rate` smallint(5) unsigned DEFAULT '200' COMMENT 'network rate throttle mbits/s';
|
||||
|
||||
|
||||
|
||||
-- RBD Primary Storage pool support (commit: 406fd95d87bfcdbb282d65589ab1fb6e9fd0018a)
|
||||
ALTER TABLE `storage_pool` ADD `user_info` VARCHAR( 255 ) NULL COMMENT 'Authorization information for the storage pool. Used by network filesystems' AFTER `host_address`;
|
||||
ALTER TABLE `cloud`.`storage_pool` ADD `user_info` VARCHAR( 255 ) NULL COMMENT 'Authorization information for the storage pool. Used by network filesystems' AFTER `host_address`;
|
||||
|
||||
-- Resource tags (commit: 62d45b9670520a1ee8b520509393d4258c689b50)
|
||||
CREATE TABLE `cloud`.`resource_tags` (
|
||||
|
|
@ -232,9 +232,9 @@ CREATE TABLE `cloud`.`nicira_nvp_nic_map` (
|
|||
-- Remove the unique constraint on physical_network_id, provider_name from physical_network_service_providers
|
||||
-- Because the name of this contraint is not set we need this roundabout way
|
||||
-- The key is also used by the foreign key constraint so drop and recreate that one
|
||||
ALTER TABLE physical_network_service_providers DROP FOREIGN KEY fk_pnetwork_service_providers__physical_network_id;
|
||||
ALTER TABLE `cloud`.`physical_network_service_providers` DROP FOREIGN KEY fk_pnetwork_service_providers__physical_network_id;
|
||||
|
||||
SET @constraintname = (select CONCAT(CONCAT('DROP INDEX ', A.CONSTRAINT_NAME), ' ON physical_network_service_providers' )
|
||||
SET @constraintname = (select CONCAT(CONCAT('DROP INDEX ', A.CONSTRAINT_NAME), ' ON cloud.physical_network_service_providers' )
|
||||
from information_schema.key_column_usage A
|
||||
JOIN information_schema.key_column_usage B ON B.table_name = 'physical_network_service_providers' AND B.COLUMN_NAME = 'provider_name' AND A.COLUMN_NAME ='physical_network_id' AND B.CONSTRAINT_NAME=A.CONSTRAINT_NAME
|
||||
where A.table_name = 'physical_network_service_providers' LIMIT 1);
|
||||
|
|
@ -243,7 +243,7 @@ PREPARE stmt1 FROM @constraintname;
|
|||
EXECUTE stmt1;
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
|
||||
AlTER TABLE physical_network_service_providers ADD CONSTRAINT `fk_pnetwork_service_providers__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE;
|
||||
AlTER TABLE `cloud`.`physical_network_service_providers` ADD CONSTRAINT `fk_pnetwork_service_providers__physical_network_id` FOREIGN KEY (`physical_network_id`) REFERENCES `physical_network`(`id`) ON DELETE CASCADE;
|
||||
UPDATE `cloud`.`configuration` SET description='In second, timeout for creating volume from snapshot' WHERE name='create.volume.from.snapshot.wait';
|
||||
|
||||
ALTER TABLE `cloud`.`data_center` ADD COLUMN `is_local_storage_enabled` tinyint NOT NULL DEFAULT 0 COMMENT 'Is local storage offering enabled for this data center; 1: enabled, 0: not';
|
||||
|
|
|
|||
|
|
@ -1639,3 +1639,15 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Usage', 'DEFAULT', 'manageme
|
|||
|
||||
INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name) VALUES (163, UUID(), 10, 'Ubuntu 12.04 (32-bit)');
|
||||
INSERT IGNORE INTO `cloud`.`guest_os` (id, uuid, category_id, display_name) VALUES (164, UUID(), 10, 'Ubuntu 12.04 (64-bit)');
|
||||
|
||||
DROP TABLE IF EXISTS `cloud`.`netscaler_pod_ref`;
|
||||
CREATE TABLE `cloud`.`netscaler_pod_ref` (
|
||||
`id` bigint unsigned NOT NULL auto_increment COMMENT 'id',
|
||||
`external_load_balancer_device_id` bigint unsigned NOT NULL COMMENT 'id of external load balancer device',
|
||||
`pod_id` bigint unsigned NOT NULL COMMENT 'pod id',
|
||||
PRIMARY KEY (`id`),
|
||||
CONSTRAINT `fk_ns_pod_ref__pod_id` FOREIGN KEY (`pod_id`) REFERENCES `cloud`.`host_pod_ref`(`id`) ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_ns_pod_ref__device_id` FOREIGN KEY (`external_load_balancer_device_id`) REFERENCES `external_load_balancer_devices`(`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'management-server', 'eip.use.multiple.netscalers' , 'false', 'Should be set to true, if there will be multiple NetScaler devices providing EIP service in a zone');
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@ SET foreign_key_checks = 0;
|
|||
ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `max_hosts_per_cluster` int unsigned DEFAULT NULL COMMENT 'Max. hosts in cluster supported by hypervisor';
|
||||
ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `storage_motion_supported` int(1) unsigned DEFAULT 0 COMMENT 'Is storage motion supported';
|
||||
UPDATE `cloud`.`hypervisor_capabilities` SET `max_hosts_per_cluster`=32 WHERE `hypervisor_type`='VMware';
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, storage_motion_supported) VALUES ('XenServer', '6.1.0', 50, 1, 13, 1);
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_hosts_per_cluster) VALUES ('VMware', '5.1', 128, 0, 32);
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_data_volumes_limit, storage_motion_supported) VALUES (UUID(), 'XenServer', '6.1.0', 50, 1, 13, 1);
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled, max_hosts_per_cluster) VALUES (UUID(), 'VMware', '5.1', 128, 0, 32);
|
||||
DELETE FROM `cloud`.`configuration` where name='vmware.percluster.host.max';
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'AgentManager', 'xen.nics.max', '7', 'Maximum allowed nics for Vms created on Xen');
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT', 'management-server', 'midonet.apiserver.address', 'http://localhost:8081', 'Specify the address at which the Midonet API server can be contacted (if using Midonet)');
|
||||
|
|
@ -348,7 +348,7 @@ ALTER TABLE `cloud`.`remote_access_vpn` ADD COLUMN `uuid` varchar(40) UNIQUE;
|
|||
|
||||
-- START: support for LXC
|
||||
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES ('LXC', 'default', 50, 1);
|
||||
INSERT IGNORE INTO `cloud`.`hypervisor_capabilities`(uuid, hypervisor_type, hypervisor_version, max_guests_limit, security_group_enabled) VALUES (UUID(), 'LXC', 'default', 50, 1);
|
||||
ALTER TABLE `cloud`.`physical_network_traffic_types` ADD COLUMN `lxc_network_label` varchar(255) DEFAULT 'cloudbr0' COMMENT 'The network name label of the physical device dedicated to this traffic on a LXC host';
|
||||
|
||||
UPDATE configuration SET value='KVM,XenServer,VMware,BareMetal,Ovm,LXC' WHERE name='hypervisor.list';
|
||||
|
|
@ -1710,5 +1710,5 @@ INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT', 'VpcMa
|
|||
|
||||
-- Re-enable foreign key checking, at the end of the upgrade path
|
||||
SET foreign_key_checks = 1;
|
||||
|
||||
UPDATE `cloud`.`snapshot_policy` set uuid=id WHERE uuid is NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,11 +79,35 @@ class Services:
|
|||
"PortForwarding": 'VirtualRouter',
|
||||
},
|
||||
},
|
||||
"network_offering_shared": {
|
||||
"name": 'Test Network offering shared',
|
||||
"displaytext": 'Test Network offering Shared',
|
||||
"guestiptype": 'Shared',
|
||||
"supportedservices": 'Dhcp,Dns,UserData',
|
||||
"traffictype": 'GUEST',
|
||||
"specifyVlan" : "True",
|
||||
"specifyIpRanges" : "True",
|
||||
"serviceProviderList" : {
|
||||
"Dhcp": 'VirtualRouter',
|
||||
"Dns": 'VirtualRouter',
|
||||
"UserData": 'VirtualRouter',
|
||||
},
|
||||
},
|
||||
"network": {
|
||||
"name": "Test Network",
|
||||
"displaytext": "Test Network",
|
||||
"acltype": "Account",
|
||||
},
|
||||
"network2": {
|
||||
"name": "Test Network Shared",
|
||||
"displaytext": "Test Network Shared",
|
||||
"vlan" :1201,
|
||||
"gateway" :"172.16.15.1",
|
||||
"netmask" :"255.255.255.0",
|
||||
"startip" :"172.16.15.21",
|
||||
"endip" :"172.16.15.41",
|
||||
"acltype": "Account",
|
||||
},
|
||||
# ISO settings for Attach/Detach ISO tests
|
||||
"iso": {
|
||||
"displaytext": "Test ISO",
|
||||
|
|
@ -176,6 +200,14 @@ class TestDeployVM(cloudstackTestCase):
|
|||
self.network_offering.update(self.apiclient, state='Enabled') # Enable Network offering
|
||||
self.services["network"]["networkoffering"] = self.network_offering.id
|
||||
|
||||
self.network_offering_shared = NetworkOffering.create(
|
||||
self.apiclient,
|
||||
self.services["network_offering_shared"],
|
||||
)
|
||||
self.cleanup.insert(0, self.network_offering_shared)
|
||||
self.network_offering_shared.update(self.apiclient, state='Enabled') # Enable Network offering
|
||||
self.services["network2"]["networkoffering"] = self.network_offering_shared.id
|
||||
|
||||
################
|
||||
### Test Network
|
||||
self.test_network = Network.create(
|
||||
|
|
@ -185,6 +217,14 @@ class TestDeployVM(cloudstackTestCase):
|
|||
self.account.domainid,
|
||||
)
|
||||
self.cleanup.insert(0, self.test_network)
|
||||
self.test_network2 = Network.create(
|
||||
self.apiclient,
|
||||
self.services["network2"],
|
||||
self.account.name,
|
||||
self.account.domainid,
|
||||
zoneid=self.services["network"]["zoneid"]
|
||||
)
|
||||
self.cleanup.insert(0, self.test_network2)
|
||||
except Exception as ex:
|
||||
self.debug("Exception during NIC test SETUP!: " + str(ex))
|
||||
self.assertEqual(True, False, "Exception during NIC test SETUP!: " + str(ex))
|
||||
|
|
@ -201,10 +241,10 @@ class TestDeployVM(cloudstackTestCase):
|
|||
accountid=self.account.name,
|
||||
domainid=self.account.domainid,
|
||||
serviceofferingid=self.service_offering.id,
|
||||
mode=self.services['mode']
|
||||
mode=self.services['mode'],
|
||||
networkids=[self.test_network.id]
|
||||
)
|
||||
self.cleanup.insert(0, self.virtual_machine)
|
||||
|
||||
list_vm_response = list_virtual_machines(
|
||||
self.apiclient,
|
||||
id=self.virtual_machine.id
|
||||
|
|
@ -256,7 +296,7 @@ class TestDeployVM(cloudstackTestCase):
|
|||
existing_nic_id = vm_response.nic[0].id
|
||||
|
||||
# 1. add a nic
|
||||
add_response = self.virtual_machine.add_nic(self.apiclient, self.test_network.id)
|
||||
add_response = self.virtual_machine.add_nic(self.apiclient, self.test_network2.id)
|
||||
|
||||
time.sleep(5)
|
||||
# now go get the vm list?
|
||||
|
|
@ -308,8 +348,9 @@ class TestDeployVM(cloudstackTestCase):
|
|||
sawException = True
|
||||
|
||||
self.assertEqual(sawException, True, "Make sure we cannot delete the default NIC")
|
||||
|
||||
self.virtual_machine.remove_nic(self.apiclient, existing_nic_id)
|
||||
self.virtual_machine.update_default_nic(self.apiclient, existing_nic_id)
|
||||
time.sleep(5)
|
||||
self.virtual_machine.remove_nic(self.apiclient, new_nic_id)
|
||||
time.sleep(5)
|
||||
|
||||
list_vm_response = list_virtual_machines(
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
nicId: nic.id
|
||||
},
|
||||
success: function(json) {
|
||||
var nic = json.listnics.nic[0];
|
||||
var nic = json.listnicsresponse.nic[0];
|
||||
var ips = nic.secondaryip ? nic.secondaryip : [];
|
||||
var ipSelection = [];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue