/// <summary> /// Delete vApp async /// </summary> /// <param name="vApp"></param> /// <param name="timeout"></param> public void DeleteVappAsync(Vapp vApp) { if (vApp == null) { string errorMsg = "vApp is null reference"; Log.logger.Error(errorMsg); throw new EnvironmentException(VCLOUD, errorMsg); } try { Log.logger.Debug(string.Format("Delete vApp: {0}", vApp.Reference.name)); vApp.Delete(); } catch (Exception e) { Log.logger.Error(e.Message); throw new EnvironmentException(VCLOUD, e.Message, e); } }
/// <summary> /// Delete vApp /// </summary> /// <param name="vApp"></param> /// <param name="timeout"></param> public void DeleteVapp(Vapp vApp, int timeout) { if (vApp == null) { string errorMsg = "vApp is null reference"; Log.logger.Error(errorMsg); throw new EnvironmentException(VCLOUD, errorMsg); } try { Log.logger.Debug(string.Format("Delete vApp Start: {0}", vApp.Reference.name)); vApp.Delete().WaitForTask(timeout); Log.logger.Debug(string.Format("Delete vApp Finish: {0}", vApp.Reference.name)); } catch (Exception e) { Log.logger.Error(e.Message); throw new EnvironmentException(VCLOUD, e.Message, e); } }