public ProviderResponse <bool> Delete(Application app, Cloud cloud)
        {
            ProviderResponse <bool> response = new ProviderResponse <bool>();

            try
            {
                IVcapClient client = new VcapClient(cloud);
                client.Delete(app.Name);
                response.Response = true;
            }
            catch (Exception ex)
            {
                response.Message = ex.Message;
            }
            return(response);
        }
Beispiel #2
0
        static bool Delete(IList<string> unparsed)
        {
            // TODO match ruby argument parsing
            if (unparsed.Count != 1)
            {
                Console.Error.WriteLine("Not enough arguments for [delete]");
                Console.Error.WriteLine("Usage: vmc delete <appname>"); // TODO usage statement standardization
                return false;
            }

            string appname = unparsed[0];

            Console.Write(deleteFmt, appname);

            IVcapClient vc = new VcapClient();
            vc.Delete(appname);
            return true;
        }
Beispiel #3
0
        static bool Delete(IList <string> unparsed)
        {
            if (unparsed.Count != 1)
            {
                Console.Error.WriteLine("Not enough arguments for [delete]");
                Console.Error.WriteLine("Usage: vmc delete <appname>");
                return(false);
            }

            string appname = unparsed[0];

            Console.Write(deleteFmt, appname);

            IVcapClient vc = new VcapClient();

            vc.Delete(appname);
            return(true);
        }
 public ProviderResponse<bool> Delete(Application app, Cloud cloud)
 {
     var response = new ProviderResponse<bool>();
     try
     {
         IVcapClient client = new VcapClient(cloud);
         client.Delete(app.Name);
         response.Response = true;
     }
     catch (Exception ex)
     {
         response.Message = ex.Message;
     }
     return response;
 }