static bool CreateService(IList<string> unparsed) { if (unparsed.Count != 2) { Console.Error.WriteLine("Usage: vmc create-service <service> <servicename>"); return false; } string svc = unparsed[0]; string svcname = unparsed[1]; IVcapClient vc = new VcapClient(); VcapClientResult rslt = vc.CreateService(svc, svcname); return rslt.Success; }
public ProviderResponse<bool> CreateService(Cloud cloud, string serviceName, string provisionedServiceName) { var response = new ProviderResponse<bool>(); try { IVcapClient client = new VcapClient(cloud); client.CreateService(serviceName, provisionedServiceName); response.Response = true; } catch (Exception ex) { response.Message = ex.Message; } return response; }