CS-14542: Fix wrong traffic label for KVM agent
CS-9919: Support for Nexus Swiches (Cisco Vswitches)

Reviewed by: Sateesh Chodapuneedi, Devdeep Singh

Description:

This is the first in a series of commits for integrating the
Cloudstack Management Server with the Nexus 1000v Virtual
Supervisor Module.

These changes introduce the necessary API command interfaces
to work with a Cisco N1KV VSM. The backend logic is still to
be put in and will be incorporated in subsequent commits.
Please do not attempt to use these APIs until then. Also,
these are not yet filled in into commands.xml, so they are
not currently exposed.

Additional APIs would be added if required.

These changes will not break any current management server
functionality.

Given below is a description of the changes put in here:

	Added Cisco N1KV commands to core/api:
	    These are the added commands -

		AddCiscoNexusVSMCmd
		DeleteCiscoNexusVSMCmd
		ConfigureCiscoNexusVSMCmd
		ListCiscoNexusVSMCmd
		ListCiscoNexusVSMNetworksCmd

	Added a Network Element service file for Cisco N1KV.

	Declared the interface functions that we'll need for
	the N1KV VSM.

	Defined a DeviceVO file for the Cisco Nexus Element.

	Created a response file for Cisco Nexus VSM.

	Created new event types for external Switching Management devices.

	Put in logic to call interface methods in ListCiscoNexusVSMNetworksCmd
	and ListCiscoNexusVSMCmd

NOT VSM RELATED:
	Fixed minor typo in some of the event types for external load balancers.
Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches)

    Description:

       Added properties of a VSM in the VSM VO class.

       Replaced the "url" input parameter by "ipaddress"
       in the AddCiscoNexusVSMCmd API.

       Added a new file - CiscoNexusVSMElement.java to
       contain the implementation of the functions
       declared in the VSMElementService interface, and
       put in implementations of the functions for the
       Nexus VSM API commands. These functions are
       defined in the CiscoNexusVSMElement class.

       Added a class for Port Profiles (PortProfile.java).
       The fields in this class are still not correctly
       declared as of now. We'll make the required changes
       going forward.

       In the next phase, we shall define and call the actual
       resource functions that will invoke the XML-RPC APIs
       (or equivalent API in face of XML-RPC API issues)
       to the N1KV VSM. We also need to define all the Dao
       access functions for the N1kv VSM. We will need to
       define new db tables and VO classes as applicable.
Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches)

****NOTE*****
This set of changes will not compile. This is WIP.
*************

Description:

	Added CiscoNexusVSMDeviceManagerImpl class.

	Added CiscoNexusVSMResource class.

	Created a new class to provide a package to
	connect to Cisco Nexus VSMs. This will be a
	set of Java wrapper functions that allow us
	to connect/disconnect and send commands and
	receive the results of those commands via
	XML-RPC. These functions are yet to be
	implemented, and will be checked in in future
	commits.

	Added two new classes, VSMCommand and
	VSMResponse, to encapsulate XML-RPCcommands
	and responses to and from a Ciscon Nexus VSM.

	Put in the following function stubs inside the
	CiscoNexusVSMService class:

		connectToVSM()
		disconnectFromVSM()
		executeVSMCommand()

	Added new field in the Type enum of the "Host"
	interface, for Cisco Nexus VSMs.

****TODO in immediate commit****
************i*******************

	Fix all compile errors in CiscoNexusVSMDeviceManagerImpl.

	Define a new interface "CiscoNexusVSMDeviceManager" and
	make CiscoNexusVSMElement implement it.
Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches) (commit# 4)

	*****NOTE****
	*************

		This set of changes will also *not* compile.
		We need to cleanup a bit more before the src
		starts compiling.

Description:

	Added two parameters to AddCiscoNexusVSMCommand
		vsmName
		zoneId

	Modified the CiscoNexusVSMDeviceVO constructor to
	take in an zoneId as a parameter when creating
	the VO object.

	Added new interface and class for the DeviceDao
	implementation for Cisco Nexus VSM devices:
		CiscoNexusVSMDeviceDao
		CiscoNexusVSMDeviceDaoImpl

	Removed the vsmvCenterDomainId property, since it's
	going to the same as vsmDomainId, which is the VSM's
	switch Domain Id.

	Have started putting in the following query functions
	in the CiscoNexusVSMDeviceDao interface:

		ListbyZoneId()
		- Lists all VSMs in the specified zone.

		ListbyAccountId()
		- Lists all VSMs owned by the specified Account.

		ListbyMgmtVLAN(vlanId)
		- Lists all VSMs whose mgmt interfaces are configured on the specified VLAN.
			- Filters results by the invoker's account Id.

		ListbyStorageVLAN(vlanId)
		- Lists all VSMs whose storage VLAN matches the specified VLAN.
			- Filters results by the invoker's account Id.

		ListbyControlVLAN(vlanId)
		- Lists all VSMs whose control VLAN matches the specified VLAN.
			- Filters results by the invoker's account Id.

		ListbyPacketVLAN(vlanId)
		- Lists all VSMs whose Packet VLAN matches the specified VLAN.
			- Filters results by the invoker's account Id.

		ListbyConfigMode(mode)
		- Lists all VSMs which are currently configured in the specified mode (standalone/HA).
			- Filters results by the invoker's account Id.

		ListbyConfigState(configState)
		- Lists all VSMs which are currently configured in the specified state (primary/standby).
			- Filters results by the invoker's account Id.

		ListbyDeviceState(deviceState)
		- Lists all VSMs which are currently in the specified device state (enabled/disabled).
			- Filters results by the invoker's account Id.

		getBySwitchDomainId(domId)
		- Retrieves the VSM with the specified switch domain Id. Each VSM has a unique switch domain Id, just like a real physical switch would.
			- Filters results by invoker's account id.

		getbySwitchName(vsmName)
		- Retrieves the VSM's VO object by the specified vsmName.

	Put in DAO implementations of some of the above functions in the CiscoNexusVSMDeviceDaoImpl class.

	Added a vsmName parameter to the CiscoNexusVSMDeviceVO class.
Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches) (commit# 5)

Description:

	Cleaned up a few files. Branch now compiles.
Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches) (commit# 6)

	   At this point, the mgmt server comes up, loading the
	   Nexus related modules without dying.

Description:

	1) Added a new properties file for Cisco N1kv VSM commands:
		cisconexusvsm_commands.properties.in

	2) Added the CiscoNexusVSMElement to the components.xml file.

	3) Modified CiscoNexusVSMElement to implement NetworkElement.

		The NetworkElement interface functions are not
	  	relevant to the N1KV VSM, so we override them
	  	with noops.

	4) Added an addDao() of CiscoNexusVSMDeviceDaoImpl in populateDaos(),
	   else we'd run into a failure to look up the VSM's dao when the
	   mgmt server is starting up:

		com.cloud.utils.exception.CloudRuntimeException: Unable to find DAO com.cloud.network.dao.CiscoNexusVSMDeviceDao

	5) Also added the CiscoNexusVSMElementService in populateServices(),
	   and modified CiscoNexusVSMElement to implement Manager as well.

	6) populateServices() was running into an exception that indicated
	   that it was unable to find a commands.properties file for the
	   cisco n1kv vsm service. Fixed it by changing getProperties() in
	   CiscoNexusVSMElement to return the correct string
	   "cisconexusvsm_commands.properties", and putting in an @Override
	   for getProperties() in CiscoNexusVSMElement. Also fixed up all
	   the other functions in CiscoNexusVSMElement that needed to have
	   @Override. Also updated build/developers.xml with this file
	   location. And did other small cleanup.

	7) More clean up in CiscoNexusVSMDeviceManagerImpl.
Merge branch 'pvt-nexus-feature' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into pvt-nexus-feature