示例#1
0
 private YamlMachinePolicy(string name, string renamedFrom, string description, YamlMachineHealthCheckPolicy healthCheckPolicy, YamlMachineConnectivityPolicy connectivityPolicy, YamlMachineUpdatePolicy updatePolicy, YamlMachineCleanupPolicy cleanupPolicy)
 {
     Name               = name;
     RenamedFrom        = renamedFrom;
     Description        = description;
     HealthCheckPolicy  = healthCheckPolicy;
     ConnectivityPolicy = connectivityPolicy;
     UpdatePolicy       = updatePolicy;
     CleanupPolicy      = cleanupPolicy;
 }
示例#2
0
 public static YamlMachinePolicy FromModel(MachinePolicy model)
 {
     return(new YamlMachinePolicy
            (
                model.Identifier.Name,
                model.Identifier.RenamedFrom,
                model.Description,
                YamlMachineHealthCheckPolicy.FromModel(model.HealthCheckPolicy),
                YamlMachineConnectivityPolicy.FromModel(model.ConnectivityPolicy),
                YamlMachineUpdatePolicy.FromModel(model.UpdatePolicy),
                YamlMachineCleanupPolicy.FromModel(model.CleanupPolicy)
            ));
 }