public MachineHealthCheckPolicy()
 {
     PowerShellHealthCheckPolicy = new MachineScriptPolicy();
     BashHealthCheckPolicy       = new MachineScriptPolicy();
     HealthCheckInterval         = TimeSpan.FromHours(1);
     HealthCheckType             = HealthCheckType.RunScript;
 }
Exemplo n.º 2
0
        private static MachineHealthCheckScriptPolicy ToScriptPolicy(Octopus.Client.Model.MachineScriptPolicy machineScriptPolicy)
        {
            if (machineScriptPolicy.RunType == Octopus.Client.Model.MachineScriptPolicyRunType.InheritFromDefault)
            {
                return(MachineHealthCheckScriptPolicy.InheritFromDefault());
            }
            if (machineScriptPolicy.RunType == Octopus.Client.Model.MachineScriptPolicyRunType.Inline)
            {
                return(MachineHealthCheckScriptPolicy.Inline(machineScriptPolicy.ScriptBody));
            }

            throw new InvalidOperationException($"Unsupported {nameof(Octopus.Client.Model.MachineScriptPolicy)}");
        }
 public MachineHealthCheckPolicy(MachineScriptPolicy tentacleEndpointHealthCheckPolicy, MachineScriptPolicy sshEndpointHealthCheckPolicy)
 {
     TentacleEndpointHealthCheckPolicy = tentacleEndpointHealthCheckPolicy;
     SshEndpointHealthCheckPolicy = sshEndpointHealthCheckPolicy;
 }
 public MachineHealthCheckPolicy()
 {
     TentacleEndpointHealthCheckPolicy = new MachineScriptPolicy();
     SshEndpointHealthCheckPolicy = new MachineScriptPolicy();
     HealthCheckInterval = TimeSpan.FromHours(1);
 }
 public MachineHealthCheckPolicy(MachineScriptPolicy powerShellHealthCheckPolicy, MachineScriptPolicy bashHealthCheckPolicy)
 {
     PowerShellHealthCheckPolicy = powerShellHealthCheckPolicy;
     BashHealthCheckPolicy       = bashHealthCheckPolicy;
 }
 public MachineHealthCheckPolicy(MachineScriptPolicy tentacleEndpointHealthCheckPolicy, MachineScriptPolicy sshEndpointHealthCheckPolicy)
 {
     TentacleEndpointHealthCheckPolicy = tentacleEndpointHealthCheckPolicy;
     SshEndpointHealthCheckPolicy      = sshEndpointHealthCheckPolicy;
 }
 public MachineHealthCheckPolicy()
 {
     TentacleEndpointHealthCheckPolicy = new MachineScriptPolicy();
     SshEndpointHealthCheckPolicy      = new MachineScriptPolicy();
     HealthCheckInterval = TimeSpan.FromHours(1);
 }