Commit Graph

1464 Commits

Author SHA1 Message Date
frank 9e4bfca027 CloudStack CS-15244
Not able to put the host in maintenance mode when one of the host in the cluster has host tag and the other host does not have a host tag. We are also not able to cancel the Maintenance mode.

fixed
reviewed-by: edison
2012-06-06 14:06:15 -07:00
Vijayendra Bhamidipati ea23f52003 CS-15173: Additional Cluster is allowed to add with the same VSM IPaddress as the previous cluster
reviewed-by: Vijay
Description:

	Restricting association of a Cisco Nexus VSM to a single
	cluster.
2012-05-31 13:49:48 -07:00
Vijayendra Bhamidipati b5b309d6ee CS-9919: Support for Nexus Swiches (Cisco Vswitches)
reviewed-by: Devdeep
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.
2012-05-23 16:44:50 -07:00
Sateesh Chodapuneedi a387e0c77d CS-9919: Support for Nexus Swiches (Cisco Vswitches)
reviewed-by: Devdeep

Updating the checks for VSM parameter validation while adding cluster.
2012-05-23 23:53:03 +05:30
Vijayendra Bhamidipati 07f0e549c4 CS-15055: DB exception when creating n1kv VSM when adding a cluster via the latest management server GUI.
reviewed-by: sateesh

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.
2012-05-23 23:33:49 +05:30
prachi f77dc7dfa2 CS-15061: Not able to add account based ingress rules.NullPointerException seen in management server logs.
Reviewed-By: Sheng Yang

Adding null check - regression due to CS 14968
2012-05-22 18:12:04 -07:00
Vijayendra Bhamidipati f3647ff0b5 CS-9919: Support for Nexus Swiches (Cisco Vswitches)
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.
2012-05-22 17:22:29 -07:00
Vijayendra Bhamidipati a1eba25802 CS-9919: Support for Nexus Swiches (Cisco Vswitches)
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.
2012-05-21 19:16:00 -07:00
Murali reddy 135431d727 bug CS-14862: EIP/ELB - SSVM and CPVM should be given an ip address from the public ip address range.
With this fix  both SSVM and CPVM will get public IP's in case of basic zone with EIP service.
A static NAT rule is implicitly configured on the EIP service provider to map public IP to a
guest IP address associated with SSVM/CPVM
2012-05-21 20:08:46 +05:30
Nitin Mehta d310b7fa0a bug CS-14945:
UploadVolume API is async now with the guidance for all the new apis added in 3.0.x need to be async. Though the success/failure wont be available through the queryAsync job which will report only the initial validation success or failure. The success or failure and the progress will all be available through listVolumes api.
2012-05-21 14:18:02 +05:30
Vijayendra Bhamidipati c5a196f005 Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x 2012-05-18 17:34:26 -07:00
Vijayendra Bhamidipati 3a39913fe1 CS-9919 Support for Nexus Swiches (Cisco Vswitches)
Description:

	Modified the following commands to be Async:
		a. EnableCiscoNexusVSM
		b. DisableCiscoNexusVSM
		c. DeleteCiscoNexusVSM

	Cleaned up miscellaneous code.
2012-05-18 17:32:17 -07:00
Jessica Tomechak 12d7b3fad2 CS-14949
Document workaround: need to stop VM before calling API.
2012-05-18 17:27:47 -07:00
Alena Prokharchyk 7b0dd13436 Fixed API doc for template response 2012-05-18 12:50:40 -07:00
kishan 2549ec2ae3 bug CS-14965: RegisterSSHKeypair API. allow public key length upto 5120
status CS-14965: resolved fixed
reviewed-by: Nitin
2012-05-18 16:42:11 +05:30
Jayapal 0f3dd01c4a bug cs-14968: added syntax check for cidrs 2012-05-18 16:35:43 +05:30
Vijayendra Bhamidipati 74b105b9d2 CS-9919 Support for Nexus Swiches (Cisco Vswitches)
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.
2012-05-16 19:51:28 -07:00
Vijayendra Bhamidipati 1b36020873 CS-9919 Support for Nexus Swiches (Cisco Vswitches)
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
2012-05-16 18:06:50 -07:00
Kelven Yang 72bf0c46fa Support console access through rebooting with XAPI session re-negotiation 2012-05-16 16:57:48 -07:00
Edison Su 5a5be77d37 CS-14521
Remove CLVM, due to license issue
2012-05-15 15:12:18 -07:00
Sateesh Chodapuneedi b82c8b87e1 CS-9919 Support for Nexus Swiches (Cisco Vswitches)
Added VSM credentials to AddClusterCmd(optonal params only).
Cleanup.
2012-05-15 09:35:32 -07:00
Vijayendra Bhamidipati de30d66fd8 Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches)
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.
2012-05-14 18:42:29 -07:00
Vijayendra Bhamidipati 685427b1b7 Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches)
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.
2012-05-14 18:25:55 -07:00
Vijayendra Bhamidipati 8362c89782 CS-9919: Support for Nexus Swiches (Cisco Vswitches)
Description:

	1. Missed replacing older table name for VSMs in a few
	   files (changed the name from
	   external_virtual_switch_management_devices to
	   virtual_supervisor_module). Fixed that in this commit.

	2. Missed adding the new Dao ClusterVSMMapDao in the Dao
	   loading in DefaultComponentLibrary. Fixed.

	3. Fixed wrong searchbuilder options passed to ipaddrSearch
	   in CiscoNexusVSMDeviceDaoImpl.
2012-05-14 18:18:26 -07:00
Vijayendra Bhamidipati a373250f94 Bug CS-9919: Support for Nexus Swiches (Cisco Vswitches)
Description:

	Fixing a wrong package path in CiscoNexusVSMResponse.

	More commits to follow.
2012-05-14 18:17:34 -07:00
Vijayendra Bhamidipati aaabd427f6 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.

       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.

	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.

	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:

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

	Added a vsmName parameter to the CiscoNexusVSMDeviceVO class.
2012-05-14 18:15:11 -07:00
Alena Prokharchyk 224c85a52b Documented the fact that hypervisor property is returned only when listTemplate/listIsos is called by the ROOT admin 2012-05-14 10:13:34 -07:00
Nitin Mehta b2c38acb4e bug CS-14785: Allow attaching the volume for Uploaded volume. Also have transition fo delete volume. 2012-05-14 16:41:56 +05:30
Alena Prokharchyk 04b0aea11b CS-14685: Added customdiskofferingmaxsize to the listCapabilities response 2012-05-11 13:45:19 -07:00
Nitin Mehta cf23d2e63f bug CS-14785: Improvements to volumes sync so that it can recover from any error. Introduced new state UploadOp which signifies that the volume os on secondary and the status would be picked up from volume host ref table. 2012-05-11 11:38:07 +05:30
Nitin Mehta 8ac10c5941 bug CS-14739: Check for the volume and vm hypervisor compatibility before attaching the volume to vm in case the volume is on secondary storage. 2012-05-04 16:30:08 +05:30
JohnZ ef2c7423f1 S3 API merged branch 2012-05-02 15:51:10 +01:00
Nitin Mehta 7a06da8520 bug CS-10789: Some more code to make the Uploav volume more robust. 2012-05-02 11:24:46 +05:30
Nitin Mehta 540f4e1431 bug CS-10789: Put zone id in the volumehost ref table. make list volume to show the percent uploaded. 2012-05-01 18:36:31 +05:30
Vijayendra Bhamidipati f601db1304 Bug 14060: Include a CloudStack error code in an Exception Response
Bug 13127: API error text refer to database ids instead of uuids

Code-Reviewers: Ewan Mellor, Kelven Yang

Description:

	1. A new class CSExceptionErrorCode has been added to utils.
	   It contains a list of error codes for each type of
	   Exception class. Use fully qualified package paths for
	   Exceptions in CSExceptionErrorCode.  We log any exception
	   name not found in the list of error codes for exceptions.

	2. Whenever we throw an exception exobj anywhere in the
	   CS code, the CSErrorCode is set in the base class
	   constructor.

	3. We add a new field csErrorCode in classes CloudException,
	   RuntimeCloudException, ExecutionException and
	   ExceptionResponse.

	4. Two places in ApiServer.java were wrongly modified when
	   putting in changes for bug 13127 to not throw an exception.
	   This has been corrected in this commit.
2012-05-01 13:48:15 +01:00
Vijayendra Bhamidipati 1d749bb9d3 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modified the IdentityTypeAdapter's custom serializer to
	identify whether this is an exception response that is being
	serialized, by checking if the idFieldName is set. If so,
	serialize both uuid and the uuidProperty (for eg, zoneId and
	"zoneId" (string)) and pass back the json representation of that.

	Modified XML serializer also to build a list of uuids+fieldnames.

	Introduced a new field "cserrorcode" in ExceptionResponse. This
	refers to an error code that can be according to the specific
	Exception being thrown. This will be serialized as usual. There
	shouldn't be any need to do a db lookup for conversion for these
	error codes.
2012-05-01 13:28:22 +01:00
Vijayendra Bhamidipati bea85d47a7 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Modify Exception handling to enable addition of multiple
	uuids in a single exception thrown by API functions. Both
	XML and JSON outputs will store all uuids and Fieldnames.
	This will make it easier to provide more information when
	an exception occurs - for example, a zone id, a cluster id,
	host id, and then a specific property id.
2012-05-01 13:28:21 +01:00
Vijayendra Bhamidipati 094f01be41 Bug 13127: API error text refer to database ids instead of uuids
Description:

	Added a field name for the db id in the IdentityProxy class, and
	modified setProxyObject() to take an additional id name parameter.
	This will let us know the name of the uuid that we are returning.
	E.g.- domainId, zoneId, etc. The client can view this field in
	the json/xml output. Modified the JSON/XML serialization routines
	to append this new parameter to the serialized output for Exception
	Responses.
2012-05-01 13:28:20 +01:00
Vijayendra Bhamidipati 7ea32a4471 Bug 13127: API error text refer to database ids instead of uuids
Description:

	1) Put in an IdentityProxy object in the ExceptionResponse class.
	   This allows us to copy over the IdentityProxy object contained
	   in the exception caught by handlerequest() when thrown by the
	   command's execute() method, into the Response object that is
	   prepared to return an exception response to the calling API
	   invocation.

	2) Modified the GSON serialization method to conver the entire
	   exception object into JSON format and not just the error text.

	3) Modify the updateDomain API to populate the exception it throws
	   upon detecting a duplicate domain to include the tablename and
	   domain db id in the exception's IdentityProxy object.

	NOTE:
	1) We can modify the base exception classes and the ExceptionResponse
	   class to contain a list of IdentityProxy objects rather than a
	   single one.
	2) We will need to modify all commands such that wherever applicable
	   (wherever a db id is involved), they populate the IdentityProxy
	   object(s) before throwing an exception.
2012-05-01 13:28:19 +01:00
Vijayendra Bhamidipati b4cefb4cc6 Bug 13127: API error text refer to database ids instead of uuids
Description:

	1) Added a setProxyObject() method to CloudException and RuntimeCloudException
	2) Modified a bunch of throw exceptions in NetworkManagerImpl.java to call setProxyObject() before throwing an exception.
	3) Changed scope of ProxyIdentity attribute to protected.
	4) Added routines to ServerApiException to get/set IdentityProxy object, and
	   routine in RuntimeCloudException to get the Idproxy object.
	5) Modified the exception handling around the dispatcher and handlerequest()
	   to copy over the IdentityProxy information before rethrowing an exception
	   eventually back to handle().
	6) Removed duplicate IdentityProxy object in ServerApiException.
	   It was extending RuntimeCloudException which already had an
	   IdentityProxy object.
2012-05-01 13:28:16 +01:00
Vijayendra Bhamidipati efdaa4d110 Bug 13127: API error text refer to database ids instead of uuids
Description:

1)	Moved RuntimeCloudException from api/ to utils/.

	Added simple constructor to RuntimeCloudException.

	Modified all classes that extended RuntimeException
	to extend RuntimeCloudException. These classes
	are listed below:

		ServerApiException
		CloudAuthenticationException
		CloudExecutionException
		AsyncCommandQueued
		HypervisorVersionChangedException
		RuntimeCloudException

2)	Added overloaded constructed to CloudException.
	Modified all classes that extend Exception to extend CloudException instead.
	These classes are listed below:

		ConcurrentOperationException
                ConflictingNetworkSettingsException
                ConnectionException
                DiscoveryException
                InsufficientCapacityException
                ManagementServerException
                ResourceUnavailableException
                VirtualMachineMigrationException
                AgentControlChannelException
                OperationTimedoutException.java
                UnsupportedVersionException.java
                UsageServerException.java
                UnableDeleteHostException.java
                AgentAuthnException.java
                HttpCallException.java
                ActiveFencingException.java
                ClusterInvalidSessionException.java
                GreTunnelException.java
                OvsVlanExhaustedException.java
2012-05-01 13:21:44 +01:00
U-CITRITE\vijayendra1 89db087981 Bug 13127: API error text refer to database ids instead of uuids
Description:

1)	Adding two new classes, CloudException and RunTimeCloudException.
	The former extends Exception and the latter RunTimeException.
	These will be used by classes that formerly directly extended
	Exception and RuntimeException. These two classes have an attribute
	of type IdentityProxy to enable exceptions fill in db ids in separate
	attribute fields rather than in a string. Doing so will allow the
	serialization module (GSON for JSON and other for XML) to kick in
	and convert this db id to a uuid in ApiServer.java just before the
	JSON/XML responses are sent out.

2)	Moving IdentityProxy.java from api/ to utils/ since
	both CloudException and RuntimeCloudException refer to it.

3)	Changing references to IdentityProxy class from api/ to utils/.

4)	While rebasing to master, a new file was added, merging
	api/src/com/cloud/api/response/IsoVmResponse.java to this diff.
2012-05-01 13:21:42 +01:00
anthony 2466e499c8 removed unused files 2012-05-01 13:18:28 +01:00
Alena Prokharchyk f8e32a5b05 bug 13860: Added async job types to Account/User Async api commands and more logging.
Reviewed-by: Kelven Yang
2012-05-01 13:16:24 +01:00
prachi 05ea7c99f5 Added instanceType to some async commands related to physical network
Reviewed-By: Alena Prokharchyk

Conflicts:

	api/src/com/cloud/api/response/AsyncJobResponse.java
	api/src/com/cloud/async/AsyncJob.java
2012-05-01 13:12:42 +01:00
Jessica Tomechak aa8d3bca8f Expand documentation of returned alert types in listAlerts API Reference page. 2012-05-01 13:08:22 +01:00
prachi 9a4f5f90a2 Fix error from merge 2012-04-30 17:08:36 -07:00
prachi 4902673fce Added the missing @Implementation annotation for the new API command MarkDefaultZoneForAccountCmd 2012-04-30 17:08:34 -07:00
Likitha Shetty 6ab04076b5 Implementation of api 'markDefaultZoneForAccount'(to enable a user to mark a zone as default for an account).
reviewed-by: prachi
2012-04-30 17:08:32 -07:00
Likitha Shetty 860aa58540 Fix RevokeSecurityGroupIngressCmd in AWSAPI to use responsename returned by CloudStack
reviewed by: prachi
2012-04-30 17:08:18 -07:00