예제 #1
0
 public static Task Delete(vCloudClient client, ReferenceType _ref)
 {
     try
     {
         return(AbstractVapp <T> .AsyncDelete(client, _ref.href));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #2
0
 public Task Delete()
 {
     try
     {
         return(AbstractVapp <T> .AsyncDelete(this.VcloudClient, this.Reference.href));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #3
0
 public Task DiscardSuspend()
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(this.VcloudClient, this.Reference.href + "/action/discardSuspendedState", (string)null, (string)null, 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #4
0
 public static Task DiscardSuspend(vCloudClient client, ReferenceType _ref)
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(client, _ref.href + "/action/discardSuspendedState", (string)null, (string)null, 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #5
0
 public Task Reset()
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(this.VcloudClient, this.Reference.href + "/power/action/reset", (string)null, (string)null, 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #6
0
 public static Task Reset(vCloudClient client, ReferenceType _ref)
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(client, _ref.href + "/power/action/reset", (string)null, (string)null, 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #7
0
 public Task Undeploy(UndeployPowerActionType undeployPowerAction)
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(this.VcloudClient, this.Reference.href + "/action/undeploy", AbstractVapp <T> .CreateVappUnDeployParamBody(undeployPowerAction), "application/vnd.vmware.vcloud.undeployVAppParams+xml", 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #8
0
 public Task Deploy(bool powerOn, int lease, bool forceCustomization)
 {
     try
     {
         return(AbstractVapp <T> .ExecuteAbstractVappAction(this.VcloudClient, this.Reference.href + "/action/deploy", AbstractVapp <T> .CreateAbstractVappDeployParamBody(powerOn, lease, forceCustomization), "application/vnd.vmware.vcloud.deployVAppParams+xml", 202));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #9
0
        public static Task Undeploy(
            vCloudClient client,
            ReferenceType _ref,
            UndeployPowerActionType undeployPowerAction)
        {
            try
            {
                string actionUrl         = _ref.href + "/action/undeploy";
                string unDeployParamBody = AbstractVapp <T> .CreateVappUnDeployParamBody(undeployPowerAction);

                return(AbstractVapp <T> .ExecuteAbstractVappAction(client, actionUrl, unDeployParamBody, "application/vnd.vmware.vcloud.undeployVAppParams+xml", 202));
            }
            catch (Exception ex)
            {
                throw new VCloudException(ex.Message);
            }
        }
예제 #10
0
 public Task SyncSyslogServer(string vAppNetworkName)
 {
     try
     {
         foreach (LinkType linkType in this.GetVappNetworkConfigurationByName(vAppNetworkName).Link)
         {
             if (linkType.rel.Equals("syncSyslogSettings"))
             {
                 return(AbstractVapp <VAppType> .ExecuteAbstractVappAction(this.VcloudClient, linkType.href, (string)null, (string)null, 202));
             }
         }
         throw new VCloudException(SdkUtil.GetI18nString(SdkMessage.RESOURCE_NOT_FOUND_MSG));
     }
     catch (Exception ex)
     {
         throw new VCloudException(ex.Message);
     }
 }
예제 #11
0
        public static Task Deploy(
            vCloudClient client,
            ReferenceType _ref,
            bool powerOn,
            int lease,
            bool forceCustomization)
        {
            try
            {
                string actionUrl           = _ref.href + "/action/deploy";
                string vappDeployParamBody = AbstractVapp <T> .CreateAbstractVappDeployParamBody(powerOn, lease, forceCustomization);

                return(AbstractVapp <T> .ExecuteAbstractVappAction(client, actionUrl, vappDeployParamBody, "application/vnd.vmware.vcloud.deployVAppParams+xml", 202));
            }
            catch (Exception ex)
            {
                throw new VCloudException(ex.Message);
            }
        }