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

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

            case Default:
                response = client.LocalClonePluggableDatabase(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.PluggableDatabase);
        }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            LocalClonePluggableDatabaseRequest request;

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

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