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

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

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

            try
            {
                request = new GetDbServerRequest
                {
                    ExadataInfrastructureId = ExadataInfrastructureId,
                    DbServerId   = DbServerId,
                    OpcRequestId = OpcRequestId
                };

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