예제 #1
0
 public TaskBootMenu(ComputerEntity computer, ImageProfileEntity imageProfile)
 {
     _computer                = computer;
     _imageProfile            = imageProfile;
     _clusterGroupServices    = new ClusterGroupServices();
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #2
0
 public DefaultBootMenu(BootMenuGenOptionsDTO defaultBootMenu)
 {
     _defaultBoot             = defaultBootMenu;
     _bootEntryServices       = new BootEntryServices();
     _secondaryServerServices = new SecondaryServerServices();
     _registration            = SettingServices.GetSettingValue(SettingStrings.RegistrationEnabled) == "No" ? " skip_registration=true " : string.Empty;
 }
예제 #3
0
        private int GenerateProcessArguments()
        {
            var multicastArgs = new MulticastArgsDTO();

            multicastArgs.schema      = new ClientPartitionHelper(_imageProfile).GetImageSchema();
            multicastArgs.Environment = _imageProfile.Image.Environment;
            multicastArgs.ImageName   = _imageProfile.Image.Name;
            multicastArgs.Port        = _multicastSession.Port.ToString();
            if (_isOnDemand)
            {
                multicastArgs.ExtraArgs = SettingServices.GetSettingValue(SettingStrings.SenderArgs);
                if (!string.IsNullOrEmpty(_clientCount))
                {
                    multicastArgs.clientCount = _clientCount;
                }
            }
            else
            {
                multicastArgs.ExtraArgs = string.IsNullOrEmpty(_imageProfile.SenderArguments)
                    ? SettingServices.GetSettingValue(SettingStrings.SenderArgs)
                    : _imageProfile.SenderArguments;
                multicastArgs.clientCount = _computers.Count.ToString();
            }

            var pid = 0;

            if (_multicastServerId == -1)
            {
                pid = new MulticastArguments().GenerateProcessArguments(multicastArgs);
            }
            else
            {
                var secondaryServer =
                    new SecondaryServerServices().GetSecondaryServer(_multicastServerId);
                pid =
                    new APICall(new SecondaryServerServices().GetToken(secondaryServer.Name))
                    .ServiceAccountApi.GetMulticastSenderArgs(multicastArgs);
            }

            if (pid == 0)
            {
                return(pid);
            }

            var activeMulticastSessionServices = new ActiveMulticastSessionServices();

            if (_isOnDemand)
            {
                _multicastSession.Pid  = pid;
                _multicastSession.Name = _group.Name;
                activeMulticastSessionServices.AddActiveMulticastSession(_multicastSession);
            }
            else
            {
                _multicastSession.Pid = pid;
                activeMulticastSessionServices.UpdateActiveMulticastSession(_multicastSession);
            }

            return(pid);
        }
예제 #4
0
 public CleanTaskBootFiles(ComputerEntity computer)
 {
     _computer                = computer;
     _bootFile                = StringManipulationServices.MacToPxeMac(_computer.Mac);
     _computerServices        = new ComputerServices();
     _clusterGroupServices    = new ClusterGroupServices();
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #5
0
 public DefaultBootMenu(BootMenuGenOptionsDTO defaultBootMenu)
 {
     _defaultBoot             = defaultBootMenu;
     _bootEntryServices       = new BootEntryServices();
     _secondaryServerServices = new SecondaryServerServices();
     _registration            = SettingServices.GetSettingValue(SettingStrings.RegistrationEnabled) == "No" ? " skip_registration=true " : string.Empty;
     _keepNamePrompt          = SettingServices.GetSettingValue(SettingStrings.OnDemandNamePrompt) == "Yes"
      ? " keep_name_prompt=true "
      : string.Empty;
 }
예제 #6
0
 public DefaultBootMenu(BootMenuGenOptionsDTO defaultBootMenu)
 {
     _defaultBoot             = defaultBootMenu;
     _bootEntryServices       = new BootEntryServices();
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #7
0
 public SecondaryServerMonitor()
 {
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #8
0
 public SecondaryServerController()
 {
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #9
0
 public CancelAllImagingTasks()
 {
     _computerServices        = new ComputerServices();
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #10
0
 public CopyPxeBinaries()
 {
     _secondaryServerServices = new SecondaryServerServices();
 }
예제 #11
0
 public ClobberBootMenu(int imageProfileId, bool promptComputerName)
 {
     _promptComputerName      = promptComputerName;
     _imageProfile            = new ImageProfileServices().ReadProfile(imageProfileId);
     _secondaryServerServices = new SecondaryServerServices();
 }