2) Added new parameter to listNetworks command - canUseForDeploy(boolean). When true, list only networks that can be used for vm deployment (networks have enough ip addresses to allocate from for the vm)
Conflicts:
api/src/com/cloud/api/ApiConstants.java
server/src/com/cloud/api/ApiDBUtils.java
server/src/com/cloud/api/ApiResponseHelper.java
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/dao/IPAddressDao.java
When the last rule is removed for vpc ip, networkId is set to null
Conflicts:
api/src/com/cloud/api/commands/AssociateIPAddrCmd.java
api/src/com/cloud/api/commands/EnableStaticNatCmd.java
api/src/com/cloud/network/NetworkService.java
api/src/com/cloud/network/rules/RulesService.java
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
server/src/com/cloud/network/rules/RulesManagerImpl.java
server/test/com/cloud/network/MockNetworkManagerImpl.java
2) Don't allow to add new networks/implement existing ones for VPC in Disabled state. Disabled state indicates that there was unsuccessful attempt to remove the VPC, and the further cleanup will be taken care of by cleanup thread.
Conflicts:
server/src/com/cloud/network/dao/IPAddressDao.java
server/src/com/cloud/server/ManagementServerImpl.java
2) Added services api support for plugging/unplugging the nics to VpcElement
Conflicts:
api/src/com/cloud/network/NetworkService.java
core/src/com/cloud/vm/VMInstanceVO.java
server/src/com/cloud/network/NetworkManagerImpl.java
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
server/test/com/cloud/network/MockNetworkManagerImpl.java
1) Added API frameworks for the feature. New commands:
* CreateVPCCmd
* ListVPCsCmd
* DeleteVPCCmd
* UpdateVPCCmd
* CreateVPCOfferingCmd
* UpdateVPCOfferingCmd
* DeleteVPCOfferingCmd
* ListVPCOfferingsCmd
2) New db tables:
* `cloud`.`vpc`
* `cloud`.`vpc_offerings`
* `cloud`.`vpc_offering_service_map`
and corresponding VO/Dao objects.
Added vpc_id field to `cloud.`networks` table - not null when network belongs to VPC
3) New Manager and Service interfaces- VpcManager/VpcService
4) Automatically create new VpcOffering (if doesn't exist) on system start
5) New Action events:
* VPC.CREATE
* VPC.UPDATE
* VPC.DELETE
* VPC.OFFERING.CREATE
* VPC.OFFERING.UPDATE
* VPC.OFFERING.DELETE
Conflicts:
api/src/com/cloud/api/ApiConstants.java
client/tomcatconf/commands.properties.in
server/src/com/cloud/api/ApiDBUtils.java
server/src/com/cloud/network/NetworkManagerImpl.java
setup/db/create-schema.sql
Description:
Removed the vcenter_dc_name and vcenter_ipaddr
fields from the virtual_supervisor_module
table, the CiscoNexusVSMDeviceVO, addClusterCmd,
and all other references to these two fields.
Fixing null pointer exceptions when checking
for nexus related global parameter values in
addClusterCmd.
Conflicts:
api/src/com/cloud/api/commands/AddClusterCmd.java
Description:
Adding an optional flag to the addCluster command,
"addvsmflag". If this is set to true, the API will
throw an exception if any VSM parameter is missed
out. The above bug was running into a DB exception
because the vCenter ipaddress wasn't passed in and
the API didn't catch it.
Description:
Incorporating more changes post review by Alena.
1. Renamed the ListCiscoVSMDetailsCmd command
to ListCiscoNexusVSMsCmd. The command will
return a list of VSMs always, depending on
what parameter is passed to it. If a clusterId
is passed to it, it will return the VSM
associated to that cluster, if present. If
a zoneId is passed in, it will return a list
of all VSMs configured for any clusters of
type VMware within that zone. If neither is
passed, it will return a list of all VSMs
configured in the management server. If no
VSMs are found, it will return an exception
response.
2. Cleaned up miscellaneous code.
Conflicts:
client/tomcatconf/cisconexusvsm_commands.properties.in
server/src/com/cloud/server/ManagementServerImpl.java
Description:
Putting in code changes as per Alena's reviews:
Replaced references to CiscoNexusVSMDeviceVO
in GetCiscoVSMByClusterIdCmd to work with an
interface that CiscoNexusVSMDeviceVO instead,
since VO objects should not be directly accessed
in APIs.
Made associated changes in other files.
More commits incorporating Alena's review comments
will follow.
Description:
Modified the following commands to be Async:
a. EnableCiscoNexusVSM
b. DisableCiscoNexusVSM
c. DeleteCiscoNexusVSM
Cleaned up miscellaneous code.
Description:
Didn't stage all modified files in previous
commit by mistake. Checking in the rest of
the changes in this commit. Please refer to
immediate previous commit for CS-9919 for
details on what changes went in with this
commit.
Conflicts:
client/tomcatconf/cisconexusvsm_commands.properties.in
Description:
Added a new API GetCiscoVSMDetailsCmd. This
API gets all details of a VSM when provided
with the VSM ID.
Resolved Conflicts:
client/tomcatconf/cisconexusvsm_commands.properties.in
Conflicts:
client/tomcatconf/cisconexusvsm_commands.properties.in
Description:
1. Added the PortProfile infrastructure:
a. PortProfileVO : The VO class to represent a db
record of the table port_profile. Each db record
represents one port profile.
b. PortProfileDao: The interface that declares search
functions on the port_profile table.
c. PortProfileDaoImpl: The class that defines the
interfaces declared in PortProfileDao.
d. PortProfileManagerImpl: The class that contains
routines that will add or delete db records from
the port_profile table. If you want to create/delete
a portprofile, call functions from this class.
e. Changes to create-schema.sql to create the port_profile
table.
2. Cleaned up code:
a. Removed a number of unused Dao and Manager objects in
CiscoNexusVSMDeviceManagerImpl.
b. Removed the ListCiscoNexusVSMNetworksCmd command.
c. Removed a bunch of import statements in a few files.
Description:
1. Changed AddCiscoNexusVSMCmd to:
a. Extend BaseCmd instead of BaseAsyncCmd.
b. Take in more required parameters (viz
vCenterDCName and vCenterIpAddress)
1a. Changed DeleteCiscoNexusVSMCmd to also
extend BaseCmd.
2. Put in changes that will ensure that
When a VSM is added, it is disabled by default.
3. Fixed code that was leading to exceptions
related to DB reads/writes to VSM related tables.
4. Added new API Constants in ApiConstants.java.
NOTE - Always initialize new attributes in
ApiConstants.java to values in small case.
Never put in upper case there. Also regardless
of what names you give attributes in the
*Cmd.java's class, you pass in parameters via
API calls by specifying <key>=<value> where the
<key> is taken from the value you specified in
ApiConstants.java.
5. Modified the addCiscoNexusVSM() function in
CiscoNexusVSMDeviceManagerImpl.java to write VSM
records to the db.