Exemplo n.º 1
0
        private void HandleOutput(StartPluggableDatabaseRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

            switch (ParameterSetName)
            {
            case StatusParamSet:
                response = client.Waiters.ForStartPluggableDatabase(request, waiterConfig, WaitForStatus).Execute();
                break;

            case Default:
                response = client.StartPluggableDatabase(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.PluggableDatabase);
        }
Exemplo n.º 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            StartPluggableDatabaseRequest request;

            try
            {
                request = new StartPluggableDatabaseRequest
                {
                    PluggableDatabaseId = PluggableDatabaseId,
                    IfMatch             = IfMatch,
                    OpcRequestId        = OpcRequestId,
                    OpcRetryToken       = OpcRetryToken
                };

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