Exemplo n.º 1
0
 public void Execute(PuppetMasterDomain puppetMaster)
 {
     foreach (var grpc in puppetMaster.GetAllNodeServices())
     {
         grpc.Status();
     }
 }
Exemplo n.º 2
0
        public void Execute(PuppetMasterDomain puppetMaster)
        {
            var response = puppetMaster.GetProcessService().StartServer(
                _serverId, _url, _minDelay, _maxDelay);

            puppetMaster.AddServer(_serverId, _url);
        }
Exemplo n.º 3
0
        public void Execute(PuppetMasterDomain puppetMaster)
        {
            var response = puppetMaster.GetProcessService().StartClient(
                _username, _clientUrl, _scriptFile, puppetMaster.GetDefaultServerUrl(),
                puppetMaster.GetPartitionClientInfo());

            //if response is cool
            puppetMaster.AddClient(_clientUrl);
        }
Exemplo n.º 4
0
        public void Execute(PuppetMasterDomain puppetMaster)
        {
            if (_numberOfReplicas != puppetMaster.ReplicationFactor)
            {
                throw new Exception("ReplicationFactor: " + puppetMaster.ReplicationFactor +
                                    " does not match: " + _numberOfReplicas);
            }

            var partition = new PartitionInfo()
            {
                masterUrl   = _servers[0],
                partitionId = _partitionName,
                serverIds   = _servers
            };

            foreach (var thing in _servers)
            {
                Console.WriteLine(thing);
            }

            puppetMaster.Partitions.Add(partition);
        }
Exemplo n.º 5
0
 public void Execute(PuppetMasterDomain puppetMaster)
 {
     var response = puppetMaster.GetServerNodeService(_serverId).Freeze(_discard);
 }
Exemplo n.º 6
0
        public void Execute(PuppetMasterDomain puppetMaster)
        {
            var response = puppetMaster.GetServerNodeService(_serverId).Crash();

            puppetMaster.RemoveServer(_serverId);
        }
Exemplo n.º 7
0
 public void Execute(PuppetMasterDomain puppetMaster)
 {
     puppetMaster.ReplicationFactor = _numberOfServers;
 }
Exemplo n.º 8
0
 public void Execute(PuppetMasterDomain puppetMaster)
 {
     Console.WriteLine("Waiting");
     Thread.Sleep(_waitTime);
     Console.WriteLine("Stopped waiting");
 }