On systems where sudo is used "echo ~" might return the homedirectory from the user who executed the sudo command.
By specifically using "echo ~username" we make sure we get back the correct homedirectory.
The same story goes for when updating the key on disk.
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
Because there are more commands after GetDomRVersion command. Though
GetDomRVersion command itself is not that critical, the commands after it may
including DHCP and firewall related commands. The failure of GetDomRVersion
command would result in the following commands fail to be executed. So it should
fail, and fail loudly.
Removed global parameters that are not required. Cleanup.
Reviewed-by: Devdeep
Not sure why but changes in VmwareServerDiscoverer.java were not picked up
when cherry-picking from 3.0.x. Putting them in this separate commit.
Description:
Deleting the row in cluster_vsm_map after
a cluster is deleted, if the cluster type
is vmware and the global vswitch nexus
config flag is set to true.
Description:
Incorporating more changes from Alena's review.
Modified the Nexus Enable and Disable commands
to return CiscoNexusVSMResponse instead of
SuccessResponse.
Put event annotations for enable/disable functions
that the enable/disable nexus commands cal into.
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:
More changes incorporating Alena's review comments:
1. Changed id to clusterId for better naming.
2. Changed the name of GetCiscoVSMByClusterIdCmd
to ListCiscoVSMDetailsCmd.
3. Removed the GetCiscoVSMDetailsCmd command.
4. Removed catch{} blocks in each of the Nexus
related APIs since the exceptions raised in
the API implementations will be caught in the
command dispatcher.
5. Added ActionEvent annotation to
deleteCiscoNexusVSM() function.
6. Modified each Nexus API command's
getEntityOwnerId() to return
Account.ACCOUNT_ID_SYSTEM.
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.