Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/1138 edge model deployment invalid format #1143

Merged
merged 2 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/AzureIoTHub.Portal/Server/Helpers/ConfigHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ public static Dictionary<string, IDictionary<string, object>> GenerateModulesCon
{
Image = module.ImageURI
},
Version = "1.0",
RestarPolicy = "always",
RestartPolicy = "always",
EnvironmentVariables = new Dictionary<string, EnvironmentVariable>()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,14 @@ public class ConfigModule
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }

[JsonProperty(PropertyName = "env")]
[JsonProperty(PropertyName = "env", NullValueHandling = NullValueHandling.Ignore)]
public IDictionary<string, EnvironmentVariable>? EnvironmentVariables { get; set; }

[JsonProperty(PropertyName = "status")]
[JsonProperty(PropertyName = "status", NullValueHandling = NullValueHandling.Ignore)]
public string? Status { get; set; }

[JsonProperty(PropertyName = "restarPolicy")]
public string? RestarPolicy { get; set; }

public string? Version { get; set; }
[JsonProperty(PropertyName = "restartPolicy", NullValueHandling = NullValueHandling.Ignore)]
public string? RestartPolicy { get; set; }

public ConfigModule()
{
Expand All @@ -36,7 +34,7 @@ public class ModuleSettings
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }

[JsonProperty(PropertyName = "createOptions")]
[JsonProperty(PropertyName = "createOptions", NullValueHandling = NullValueHandling.Ignore)]
public string CreateOptions { get; set; }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class EdgeAgentPropertiesDesired
[JsonProperty(PropertyName = "runtime")]
public Runtime Runtime { get; set; }

[JsonProperty(PropertyName = "shemaVersion")]
[JsonProperty(PropertyName = "schemaVersion")]
public string SchemaVersion { get; set; }

[JsonProperty(PropertyName = "systemModules")]
Expand Down Expand Up @@ -75,11 +75,11 @@ public SystemModules()
{
Type = "docker",
Status = "running",
RestarPolicy = "always",
RestartPolicy = "always",
Settings = new ModuleSettings
{
Image = "mcr.microsoft.com/azureiotedge-hub:1.1",
CreateOptions = "\\{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}"
CreateOptions = /*lang=json,strict*/ "{\"HostConfig\":{\"PortBindings\":{\"443/tcp\":[{\"HostPort\":\"443\"}],\"5671/tcp\":[{\"HostPort\":\"5671\"}],\"8883/tcp\":[{\"HostPort\":\"8883\"}]}}}"
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class EdgeHubPropertiesDesired
[JsonProperty(PropertyName = "routes")]
public IDictionary<string, object> Routes { get; set; }

[JsonProperty(PropertyName = "shemaVersion")]
[JsonProperty(PropertyName = "schemaVersion")]
public string SchemaVersion { get; set; }

[JsonProperty(PropertyName = "storeAndForwardConfiguration")]
Expand Down