-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 69.1.0
- Loading branch information
Showing
47 changed files
with
494 additions
and
74 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
53 changes: 53 additions & 0 deletions
53
Containerinstances/models/CreateLinuxSecurityContextDetails.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,53 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.ContainerinstancesService.Models | ||
{ | ||
/// <summary> | ||
/// Security context for Linux container. | ||
/// </summary> | ||
public class CreateLinuxSecurityContextDetails : CreateSecurityContextDetails | ||
{ | ||
|
||
/// <value> | ||
/// The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided. | ||
/// | ||
/// </value> | ||
[JsonProperty(PropertyName = "runAsUser")] | ||
public System.Nullable<int> RunAsUser { get; set; } | ||
|
||
/// <value> | ||
/// The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided. | ||
/// </value> | ||
[JsonProperty(PropertyName = "runAsGroup")] | ||
public System.Nullable<int> RunAsGroup { get; set; } | ||
|
||
/// <value> | ||
/// Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails. | ||
/// | ||
/// </value> | ||
[JsonProperty(PropertyName = "isNonRootUserCheckEnabled")] | ||
public System.Nullable<bool> IsNonRootUserCheckEnabled { get; set; } | ||
|
||
/// <value> | ||
/// Determines if the container will have a read-only root file system. Default value is false. | ||
/// </value> | ||
[JsonProperty(PropertyName = "isRootFileSystemReadonly")] | ||
public System.Nullable<bool> IsRootFileSystemReadonly { get; set; } | ||
|
||
[JsonProperty(PropertyName = "securityContextType")] | ||
private readonly string securityContextType = "LINUX"; | ||
} | ||
} |
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,56 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace Oci.ContainerinstancesService.Models | ||
{ | ||
/// <summary> | ||
/// Security context for container. | ||
/// </summary> | ||
[JsonConverter(typeof(CreateSecurityContextDetailsModelConverter))] | ||
public class CreateSecurityContextDetails | ||
{ | ||
|
||
|
||
} | ||
|
||
public class CreateSecurityContextDetailsModelConverter : JsonConverter | ||
{ | ||
public override bool CanWrite => false; | ||
public override bool CanRead => true; | ||
public override bool CanConvert(System.Type type) | ||
{ | ||
return type == typeof(CreateSecurityContextDetails); | ||
} | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
throw new System.InvalidOperationException("Use default serialization."); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
var jsonObject = JObject.Load(reader); | ||
var obj = default(CreateSecurityContextDetails); | ||
var discriminator = jsonObject["securityContextType"].Value<string>(); | ||
switch (discriminator) | ||
{ | ||
case "LINUX": | ||
obj = new CreateLinuxSecurityContextDetails(); | ||
break; | ||
} | ||
serializer.Populate(jsonObject.CreateReader(), obj); | ||
return obj; | ||
} | ||
} | ||
} |
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,53 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
|
||
|
||
namespace Oci.ContainerinstancesService.Models | ||
{ | ||
/// <summary> | ||
/// Security context for Linux container. | ||
/// </summary> | ||
public class LinuxSecurityContext : SecurityContext | ||
{ | ||
|
||
/// <value> | ||
/// The user ID (UID) to run the entrypoint process of the container. Defaults to user specified UID in container image metadata if not provided. This must be provided if runAsGroup is provided. | ||
/// | ||
/// </value> | ||
[JsonProperty(PropertyName = "runAsUser")] | ||
public System.Nullable<int> RunAsUser { get; set; } | ||
|
||
/// <value> | ||
/// The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided. | ||
/// </value> | ||
[JsonProperty(PropertyName = "runAsGroup")] | ||
public System.Nullable<int> RunAsGroup { get; set; } | ||
|
||
/// <value> | ||
/// Indicates if the container must run as a non-root user. If true, the service validates the container image at runtime to ensure that it is not going to run with UID 0 (root) and fails the container instance creation if the validation fails. | ||
/// | ||
/// </value> | ||
[JsonProperty(PropertyName = "isNonRootUserCheckEnabled")] | ||
public System.Nullable<bool> IsNonRootUserCheckEnabled { get; set; } | ||
|
||
/// <value> | ||
/// Determines if the container will have a read-only root file system. Default value is false. | ||
/// </value> | ||
[JsonProperty(PropertyName = "isRootFileSystemReadonly")] | ||
public System.Nullable<bool> IsRootFileSystemReadonly { get; set; } | ||
|
||
[JsonProperty(PropertyName = "securityContextType")] | ||
private readonly string securityContextType = "LINUX"; | ||
} | ||
} |
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,73 @@ | ||
/* | ||
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
*/ | ||
|
||
// NOTE: Code generated by OracleSDKGenerator. | ||
// DO NOT EDIT this file manually. | ||
|
||
|
||
using System.ComponentModel.DataAnnotations; | ||
using System.Runtime.Serialization; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace Oci.ContainerinstancesService.Models | ||
{ | ||
/// <summary> | ||
/// Security context for container. | ||
/// </summary> | ||
[JsonConverter(typeof(SecurityContextModelConverter))] | ||
public class SecurityContext | ||
{ | ||
/// | ||
/// <value> | ||
/// The type of security context | ||
/// </value> | ||
/// | ||
public enum SecurityContextTypeEnum { | ||
[EnumMember(Value = "LINUX")] | ||
Linux | ||
}; | ||
|
||
|
||
} | ||
|
||
public class SecurityContextModelConverter : JsonConverter | ||
{ | ||
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); | ||
public override bool CanWrite => false; | ||
public override bool CanRead => true; | ||
public override bool CanConvert(System.Type type) | ||
{ | ||
return type == typeof(SecurityContext); | ||
} | ||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | ||
{ | ||
throw new System.InvalidOperationException("Use default serialization."); | ||
} | ||
|
||
public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) | ||
{ | ||
var jsonObject = JObject.Load(reader); | ||
var obj = default(SecurityContext); | ||
var discriminator = jsonObject["securityContextType"].Value<string>(); | ||
switch (discriminator) | ||
{ | ||
case "LINUX": | ||
obj = new LinuxSecurityContext(); | ||
break; | ||
} | ||
if (obj != null) | ||
{ | ||
serializer.Populate(jsonObject.CreateReader(), obj); | ||
} | ||
else | ||
{ | ||
logger.Warn($"The type {discriminator} is not present under SecurityContext! Returning null value."); | ||
} | ||
return obj; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.