Exemple #1
0
        private void HandleOutput(GetVmClusterNetworkRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

            switch (ParameterSetName)
            {
            case LifecycleStateParamSet:
                response = client.Waiters.ForVmClusterNetwork(request, waiterConfig, WaitForLifecycleState).Execute();
                break;

            case Default:
                response = client.GetVmClusterNetwork(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.VmClusterNetwork);
        }
Exemple #2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            GetVmClusterNetworkRequest request;

            try
            {
                request = new GetVmClusterNetworkRequest
                {
                    ExadataInfrastructureId = ExadataInfrastructureId,
                    VmClusterNetworkId      = VmClusterNetworkId,
                    OpcRequestId            = OpcRequestId
                };

                HandleOutput(request);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }