protected Operation WaitForGatewayOperation(string opdesc) { Operation operation = null; String operationId = RetrieveOperationId(); SubscriptionData currentSubscription = this.GetCurrentSubscription(); try { IGatewayServiceManagement channel = (IGatewayServiceManagement)Channel; operation = RetryCall(s => channel.GetGatewayOperation(currentSubscription.SubscriptionId, operationId)); var activityId = new Random().Next(1, 999999); var progress = new ProgressRecord(activityId, opdesc, "Operation Status: " + operation.Status); while (string.Compare(operation.Status, OperationState.Succeeded, StringComparison.OrdinalIgnoreCase) != 0 && string.Compare(operation.Status, OperationState.Failed, StringComparison.OrdinalIgnoreCase) != 0) { WriteProgress(progress); Thread.Sleep(1 * 1000); operation = RetryCall(s => channel.GetGatewayOperation(currentSubscription.SubscriptionId, operationId)); } if (string.Compare(operation.Status, OperationState.Failed, StringComparison.OrdinalIgnoreCase) == 0) { var errorMessage = string.Format(CultureInfo.InvariantCulture, "{0}: {1}", operation.Status, operation.Error.Message); var exception = new Exception(errorMessage); WriteError(new ErrorRecord(exception, string.Empty, ErrorCategory.CloseError, null)); } } catch (CommunicationException ex) { WriteErrorDetails(ex); } return(operation); }
public GetAzureVNetGatewayKeyCommand(IGatewayServiceManagement channel) { Channel = channel; }
public static Operation GetGatewayOperation(this IGatewayServiceManagement proxy, string subscriptionId, string operationId) { return(proxy.EndGetGatewayOperation(proxy.BeginGetGatewayOperation(subscriptionId, operationId, null, null))); }
public static GatewayOperationAsyncResponse UpdateVirtualNetworkGatewayConnection(this IGatewayServiceManagement proxy, string subscriptionId, string virtualNetworkName, string localNetworkSiteName, UpdateConnection updateConnection) { return(proxy.EndUpdateConnection(proxy.BeginUpdateConnection(subscriptionId, virtualNetworkName, localNetworkSiteName, updateConnection, null, null))); }
public static Stream GetVirtualNetworkSupportedDevices(this IGatewayServiceManagement proxy, string subscriptionId) { return(proxy.EndListSupportedDevices(proxy.BeginListSupportedDevices(subscriptionId, null, null))); }
public static VnetGateway GetVirtualNetworkGateway(this IGatewayServiceManagement proxy, string subscriptionId, string virtualNetworkName) { return(proxy.EndGetGateway(proxy.BeginGetGateway(subscriptionId, virtualNetworkName, null, null))); }
public static SharedKey GetVirtualNetworkSharedKey(this IGatewayServiceManagement proxy, string subscriptionId, string virtualNetworkName, string localNetworkSiteName) { return(proxy.EndGetSharedKey(proxy.BeginGetSharedKey(subscriptionId, virtualNetworkName, localNetworkSiteName, null, null))); }
public static ConnectionCollection ListVirtualNetworkConnections(this IGatewayServiceManagement proxy, string subscriptionId, string virtualNetworkName) { return(proxy.EndListConnections(proxy.BeginListConnections(subscriptionId, virtualNetworkName, null, null))); }
public static GatewayOperationAsyncResponse DeleteVirtualNetworkGateway(this IGatewayServiceManagement proxy, string subscriptionId, string virtualNetworkName) { return(proxy.EndDeleteGateway(proxy.BeginDeleteGateway(subscriptionId, virtualNetworkName, null, null))); }
public RemoveAzureVNetGatewayCommand(IGatewayServiceManagement channel) { Channel = channel; }
public GetAzureVNetGatewayCommand(IGatewayServiceManagement channel) { Channel = channel; }
public NewAzureVNetGatewayCommand(IGatewayServiceManagement channel) { base.Channel = channel; }
public GetAzureVNetConnectionCommand(IGatewayServiceManagement channel) { Channel = channel; }
public GetAzureVNetConnectionCommand(IGatewayServiceManagement channel) { base.Channel = channel; }