Esempio n. 1
0
        public ReturnStatus Execute()
        {
            ReturnStatus status = new ReturnStatus();
            try
            {
                ApplicationContainer container = new ApplicationContainer(WithAppUuid, WithContainerUuid, null, WithAppName,
                WithContainerName, WithNamespace, null, null, null, WithUid);
                RubyHash options = new RubyHash();
                options["all"] = All;
                if (ParallelConcurrencyRatio != 0.0)
                {
                    options["parallelConcurrencyRatio"] = ParallelConcurrencyRatio;
                }

                status.Output = container.Restart(CartName, options);
                status.ExitCode = 0;
            }
            catch (Exception ex)
            {
                Logger.Error("Error running oo-restart command: {0} - {1}", ex.Message, ex.StackTrace);
                status.Output = ex.ToString();
                status.ExitCode = 1;

            }
            return status;
        }