Phone sales support +39 0575 05077
  Phone technical support +39 0575 0508
 

1.1 General rules

The Cloud platform is subject to architecture rules that must be understood and respected for complete and correct interaction:
  • You cannot queue more than one operation at a time on a Cloud Server (see example)
  • You can purchase a maximum of 5 Public IPs for each Cloud Server
  • The price list of the resources is independent of the datancenter with which it is interacting
  • You cannot delete Public IPs or Virtual Switches associated with the Cloud Server without logging off first
  • Cloud Servers in different datacenters may not be connected using the Virtual Switches
Example method that checks whether or not it is possible to queue operations to a Cloud Server
private static bool ServerIsEnqueueble(WsEndUserClient client, int serverId)
{
    try
    {
        //calls the GetServerDetails method,
        //getting a WWsResultOfServerDetailsbject
        WsResultOfServerDetails result = client.GetServerDetails(serverId);

        //if the call fails; it relaunches the error indicating the message 
        if (result.Success)
        {
            //the values returned are stored into the ServerDetails object
            ServerDetails details = result.Value;

            //check if there are running jobs
            if (details.ActiveJobs.Length == 0)
                return true;
            else
                return false;
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        //relaunches the generic error 
        throw new ApplicationException(ex.Message);
    }
}
//IWsEndUser.GetServerDetails Method (JAVA)
private static boolean ServerIsEnqueueble(IWsEndUser client, int serverId)
{
    boolean value = false;
    
    try
    {
        //calls the GetServerDetails method,
        //getting a WsResultOfServerDetails object 
        WsResultOfServerDetails result = client.getServerDetails(serverId);

        //if the call fails, it relaunches the error indicating the message
        if (result.isSuccess())
        {
            //the list of information on the virtual server is
            //stored in the ServerDetails object
            ServerDetails details = result.getValue();

            //checks if there are active jobs
            if (details.getActiveJobs().getJob().isEmpty())
            {
                value = true;
            }
         }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
        //prints the error 
        System.out.println(ex);
    }
    
    return value;
}

See also