-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename reboot order from `priority` to be `startupOrder`
- Loading branch information
Showing
27 changed files
with
107 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ public DockerModule( | |
RestartPolicy restartPolicy, | ||
DockerConfig config, | ||
ImagePullPolicy imagePullPolicy, | ||
uint priority, | ||
uint startupOrder, | ||
ConfigurationInfo configurationInfo, | ||
IDictionary<string, EnvVal> env) | ||
{ | ||
|
@@ -29,7 +29,7 @@ public DockerModule( | |
this.Config = Preconditions.CheckNotNull(config, nameof(config)); | ||
this.RestartPolicy = Preconditions.CheckIsDefined(restartPolicy); | ||
this.ImagePullPolicy = Preconditions.CheckIsDefined(imagePullPolicy); | ||
this.Priority = priority; | ||
this.StartupOrder = startupOrder; | ||
this.ConfigurationInfo = configurationInfo ?? new ConfigurationInfo(string.Empty); | ||
this.Env = env?.ToImmutableDictionary() ?? ImmutableDictionary<string, EnvVal>.Empty; | ||
} | ||
|
@@ -50,11 +50,11 @@ public DockerModule( | |
public virtual ImagePullPolicy ImagePullPolicy { get; } | ||
|
||
[JsonProperty( | ||
PropertyName = "priority", | ||
PropertyName = "startupOrder", | ||
Required = Required.DisallowNull, | ||
DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
[DefaultValue(Core.Constants.DefaultPriority)] | ||
This comment has been minimized.
Sorry, something went wrong.
micahl
Contributor
|
||
public virtual uint Priority { get; } | ||
public virtual uint StartupOrder { get; } | ||
|
||
[JsonProperty(Required = Required.Always, PropertyName = "type")] | ||
public virtual string Type => "docker"; | ||
|
@@ -91,7 +91,7 @@ public virtual bool Equals(IModule<DockerConfig> other) | |
this.Config.Equals(other.Config) && | ||
this.RestartPolicy == other.RestartPolicy && | ||
this.ImagePullPolicy == other.ImagePullPolicy && | ||
this.Priority == other.Priority && | ||
this.StartupOrder == other.StartupOrder && | ||
EnvDictionaryComparer.Equals(this.Env, other.Env); | ||
} | ||
|
||
|
@@ -105,7 +105,7 @@ public virtual bool IsOnlyModuleStatusChanged(IModule other) | |
this.Config.Equals(dockerModule.Config) && | ||
this.RestartPolicy == other.RestartPolicy && | ||
this.ImagePullPolicy == other.ImagePullPolicy && | ||
this.Priority == other.Priority && | ||
this.StartupOrder == other.StartupOrder && | ||
EnvDictionaryComparer.Equals(this.Env, other.Env); | ||
} | ||
|
||
|
@@ -124,7 +124,7 @@ public override int GetHashCode() | |
hashCode = (hashCode * 397) ^ (this.Config != null ? this.Config.GetHashCode() : 0); | ||
hashCode = (hashCode * 397) ^ this.RestartPolicy.GetHashCode(); | ||
hashCode = (hashCode * 397) ^ this.ImagePullPolicy.GetHashCode(); | ||
hashCode = (hashCode * 397) ^ this.Priority.GetHashCode(); | ||
hashCode = (hashCode * 397) ^ this.StartupOrder.GetHashCode(); | ||
hashCode = (hashCode * 397) ^ EnvDictionaryComparer.GetHashCode(this.Env); | ||
return hashCode; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
The end sentence would benefit rewording to align to the change to startUp. e.g.
Modules that have been assigned a higher startupOrder value will be processed before modules that have been assigned a lower one.