forked from Azure/iotedge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add HostConfig properties (Azure#4080)
* Add HostConfig properties
- Loading branch information
1 parent
ef9215e
commit e34cff7
Showing
13 changed files
with
407 additions
and
55 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/DeviceMapping.cs
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
public class DeviceMapping | ||
{ | ||
[JsonProperty("PathOnHost", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string PathOnHost { get; set; } | ||
|
||
[JsonProperty("PathInContainer", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string PathInContainer { get; set; } | ||
|
||
[JsonProperty("CgroupPermissions", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string CgroupPermissions { get; set; } | ||
|
||
[JsonExtensionData] | ||
public IDictionary<string, JToken> OtherProperties { get; set; } | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/RestartPolicy.cs
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
public class RestartPolicy | ||
{ | ||
[JsonProperty("Name", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public RestartPolicyKind Name { get; set; } | ||
|
||
[JsonProperty("MaximumRetryCount", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public long MaximumRetryCount { get; set; } | ||
|
||
[JsonExtensionData] | ||
public IDictionary<string, JToken> OtherProperties { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/RestartPolicyKind.cs
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using Newtonsoft.Json; | ||
|
||
public enum RestartPolicyKind | ||
{ | ||
[JsonProperty("")] | ||
Undefined, | ||
|
||
[JsonProperty("no")] | ||
No, | ||
|
||
[JsonProperty("always")] | ||
Always, | ||
|
||
[JsonProperty("on-failure")] | ||
OnFailure, | ||
|
||
[JsonProperty("unless-stopped")] | ||
UnlessStopped | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/ThrottleDevice.cs
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
public class ThrottleDevice | ||
{ | ||
[JsonProperty("Path", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string Path { get; set; } | ||
|
||
[JsonProperty("Rate", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public ulong Rate { get; set; } | ||
|
||
[JsonExtensionData] | ||
public IDictionary<string, JToken> OtherProperties { get; set; } | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/Ulimit.cs
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
public class Ulimit | ||
{ | ||
[JsonProperty("Name", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string Name { get; set; } | ||
|
||
[JsonProperty("Hard", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public long Hard { get; set; } | ||
|
||
[JsonProperty("Soft", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public long Soft { get; set; } | ||
|
||
[JsonExtensionData] | ||
public IDictionary<string, JToken> OtherProperties { get; set; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Docker/models/WeightDevice.cs
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
namespace Microsoft.Azure.Devices.Edge.Agent.Docker.Models | ||
{ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Linq; | ||
|
||
public class WeightDevice | ||
{ | ||
[JsonProperty("Path", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public string Path { get; set; } | ||
|
||
[JsonProperty("Weight", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] | ||
public ushort Weight { get; set; } | ||
|
||
[JsonExtensionData] | ||
public IDictionary<string, JToken> OtherProperties { get; set; } | ||
} | ||
} |
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.