Beispiel #1
0
        public ExecutableResult Execute(string keyValue)
        {
            var network = _xenNetworkInformation.Get();

            _setNetworkInterface.Execute(network.Interfaces.Values.ToList());
            _setNetworkRoutes.Execute(network);

            var providerData = _xenProviderDataInformation.Get();
            var userMetadata = _xenUserMetadata.GetKeys();

            _setProviderData.Execute(providerData, userMetadata);

            if (string.IsNullOrEmpty(keyValue) || !keyValue.StartsWith("nohostname"))
            {
                var hostname       = _xenStore.ReadVmData("hostname");
                var hostnameResult = _setHostname.SetHostname(hostname);
                return(new ExecutableResult()
                {
                    ExitCode = hostnameResult
                });
            }

            return(new ExecutableResult()
            {
                ExitCode = "0"
            });
        }
        public ExecutableResult Execute(string keyValue)
        {
            var network = _xenNetworkInformation.Get();

            _setNetworkInterface.Execute(network.Interfaces.Values.ToList());
            _setNetworkRoutes.Execute(network);

            return(new ExecutableResult());
        }
        public ExecutableResult Execute(string keyValue)
        {
            var network = _xenNetworkInformation.Get();

            _setNetworkInterface.Execute(network.Interfaces.Values.ToList());
            _setNetworkRoutes.Execute(network);

            var providerData = _xenProviderDataInformation.Get();

            _setProviderData.Execute(providerData);

            var hostname = _xenStore.ReadVmData("hostname");

            _setHostname.SetHostname(hostname);

            return(new ExecutableResult());
        }