Skip to content

Commit 95442e1

Browse files
author
DEXREQ Automation
committed
Merge pull request #2483 in SDK/oci-go-sdk from merge_to_github2023-08-11 to github
Releasing Version 65.47.1 Squashed commit of the following: commit 7c370681777711faaf53ac568b9116728587eab7 Author: oci-dex-release-bot <oci-dex-releases-bot_ww@oracle.com> Date: Fri Aug 11 14:39:38 2023 +0000 Releasing version 65 47 1
1 parent a49110c commit 95442e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+697
-64
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ temp/
1515
.project
1616
.classpath
1717
*.iml
18+
.DS_Store

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66

7+
## 65.47.1 - 2023-08-15
8+
### Added
9+
- Support for credential stores, including Single Sign-On support, for deployments in the GoldenGate service
10+
- Support for container security contexts in the Container Instances service
11+
- Support for placement constraints and cluster configurations on cluster networks in the Compute service
12+
13+
714
## 65.47.0 - 2023-08-08
815
### Added
916
- Support for backup retention on autonomous database create operations in the Database service

common/version.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

containerinstances/container.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ type Container struct {
111111

112112
// The number of container restart attempts. Depending on the restart policy, a restart might be attempted after a health check failure or a container exit.
113113
ContainerRestartAttemptCount *int `mandatory:"false" json:"containerRestartAttemptCount"`
114+
115+
SecurityContext SecurityContext `mandatory:"false" json:"securityContext"`
114116
}
115117

116118
func (m Container) String() string {
@@ -152,6 +154,7 @@ func (m *Container) UnmarshalJSON(data []byte) (e error) {
152154
IsResourcePrincipalDisabled *bool `json:"isResourcePrincipalDisabled"`
153155
ResourceConfig *ContainerResourceConfig `json:"resourceConfig"`
154156
ContainerRestartAttemptCount *int `json:"containerRestartAttemptCount"`
157+
SecurityContext securitycontext `json:"securityContext"`
155158
Id *string `json:"id"`
156159
DisplayName *string `json:"displayName"`
157160
CompartmentId *string `json:"compartmentId"`
@@ -221,6 +224,16 @@ func (m *Container) UnmarshalJSON(data []byte) (e error) {
221224

222225
m.ContainerRestartAttemptCount = model.ContainerRestartAttemptCount
223226

227+
nn, e = model.SecurityContext.UnmarshalPolymorphicJSON(model.SecurityContext.JsonData)
228+
if e != nil {
229+
return
230+
}
231+
if nn != nil {
232+
m.SecurityContext = nn.(SecurityContext)
233+
} else {
234+
m.SecurityContext = nil
235+
}
236+
224237
m.Id = model.Id
225238

226239
m.DisplayName = model.DisplayName

containerinstances/container_empty_dir_volume.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"strings"
1717
)
1818

19-
// ContainerEmptyDirVolume The empty directory of container.
19+
// ContainerEmptyDirVolume The empty directory volume of a container instance. You can create up to 64 EmptyDir per container instance.
2020
type ContainerEmptyDirVolume struct {
2121

2222
// The name of the volume. This must be unique within a single container instance.

containerinstances/container_summary.go

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package containerinstances
1111

1212
import (
13+
"encoding/json"
1314
"fmt"
1415
"github.com/oracle/oci-go-sdk/v65/common"
1516
"strings"
@@ -72,6 +73,8 @@ type ContainerSummary struct {
7273
// This method utilizes resource principal version 2.2. For information on how to use the exposed resource principal elements, see
7374
// https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm#sdk_authentication_methods_resource_principal.
7475
IsResourcePrincipalDisabled *bool `mandatory:"false" json:"isResourcePrincipalDisabled"`
76+
77+
SecurityContext SecurityContext `mandatory:"false" json:"securityContext"`
7578
}
7679

7780
func (m ContainerSummary) String() string {
@@ -92,3 +95,75 @@ func (m ContainerSummary) ValidateEnumValue() (bool, error) {
9295
}
9396
return false, nil
9497
}
98+
99+
// UnmarshalJSON unmarshals from json
100+
func (m *ContainerSummary) UnmarshalJSON(data []byte) (e error) {
101+
model := struct {
102+
FreeformTags map[string]string `json:"freeformTags"`
103+
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
104+
SystemTags map[string]map[string]interface{} `json:"systemTags"`
105+
FaultDomain *string `json:"faultDomain"`
106+
LifecycleDetails *string `json:"lifecycleDetails"`
107+
TimeUpdated *common.SDKTime `json:"timeUpdated"`
108+
ResourceConfig *ContainerResourceConfig `json:"resourceConfig"`
109+
IsResourcePrincipalDisabled *bool `json:"isResourcePrincipalDisabled"`
110+
SecurityContext securitycontext `json:"securityContext"`
111+
Id *string `json:"id"`
112+
DisplayName *string `json:"displayName"`
113+
CompartmentId *string `json:"compartmentId"`
114+
AvailabilityDomain *string `json:"availabilityDomain"`
115+
LifecycleState ContainerLifecycleStateEnum `json:"lifecycleState"`
116+
TimeCreated *common.SDKTime `json:"timeCreated"`
117+
ContainerInstanceId *string `json:"containerInstanceId"`
118+
ImageUrl *string `json:"imageUrl"`
119+
}{}
120+
121+
e = json.Unmarshal(data, &model)
122+
if e != nil {
123+
return
124+
}
125+
var nn interface{}
126+
m.FreeformTags = model.FreeformTags
127+
128+
m.DefinedTags = model.DefinedTags
129+
130+
m.SystemTags = model.SystemTags
131+
132+
m.FaultDomain = model.FaultDomain
133+
134+
m.LifecycleDetails = model.LifecycleDetails
135+
136+
m.TimeUpdated = model.TimeUpdated
137+
138+
m.ResourceConfig = model.ResourceConfig
139+
140+
m.IsResourcePrincipalDisabled = model.IsResourcePrincipalDisabled
141+
142+
nn, e = model.SecurityContext.UnmarshalPolymorphicJSON(model.SecurityContext.JsonData)
143+
if e != nil {
144+
return
145+
}
146+
if nn != nil {
147+
m.SecurityContext = nn.(SecurityContext)
148+
} else {
149+
m.SecurityContext = nil
150+
}
151+
152+
m.Id = model.Id
153+
154+
m.DisplayName = model.DisplayName
155+
156+
m.CompartmentId = model.CompartmentId
157+
158+
m.AvailabilityDomain = model.AvailabilityDomain
159+
160+
m.LifecycleState = model.LifecycleState
161+
162+
m.TimeCreated = model.TimeCreated
163+
164+
m.ContainerInstanceId = model.ContainerInstanceId
165+
166+
m.ImageUrl = model.ImageUrl
167+
168+
return
169+
}

containerinstances/create_container_details.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ type CreateContainerDetails struct {
6868
// There are three types of health checks that we currently support HTTP, TCP, and Command.
6969
HealthChecks []CreateContainerHealthCheckDetails `mandatory:"false" json:"healthChecks"`
7070

71+
SecurityContext CreateSecurityContextDetails `mandatory:"false" json:"securityContext"`
72+
7173
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
7274
// Example: `{"bar-key": "value"}`
7375
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
@@ -105,6 +107,7 @@ func (m *CreateContainerDetails) UnmarshalJSON(data []byte) (e error) {
105107
IsResourcePrincipalDisabled *bool `json:"isResourcePrincipalDisabled"`
106108
ResourceConfig *CreateContainerResourceConfigDetails `json:"resourceConfig"`
107109
HealthChecks []createcontainerhealthcheckdetails `json:"healthChecks"`
110+
SecurityContext createsecuritycontextdetails `json:"securityContext"`
108111
FreeformTags map[string]string `json:"freeformTags"`
109112
DefinedTags map[string]map[string]interface{} `json:"definedTags"`
110113
ImageUrl *string `json:"imageUrl"`
@@ -153,6 +156,16 @@ func (m *CreateContainerDetails) UnmarshalJSON(data []byte) (e error) {
153156
}
154157
}
155158

159+
nn, e = model.SecurityContext.UnmarshalPolymorphicJSON(model.SecurityContext.JsonData)
160+
if e != nil {
161+
return
162+
}
163+
if nn != nil {
164+
m.SecurityContext = nn.(CreateSecurityContextDetails)
165+
} else {
166+
m.SecurityContext = nil
167+
}
168+
156169
m.FreeformTags = model.FreeformTags
157170

158171
m.DefinedTags = model.DefinedTags
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// 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.
3+
// Code generated. DO NOT EDIT.
4+
5+
// Container Instance API
6+
//
7+
// A description of the Container Instance API
8+
//
9+
10+
package containerinstances
11+
12+
import (
13+
"encoding/json"
14+
"fmt"
15+
"github.com/oracle/oci-go-sdk/v65/common"
16+
"strings"
17+
)
18+
19+
// CreateLinuxSecurityContextDetails Security context for Linux container.
20+
type CreateLinuxSecurityContextDetails struct {
21+
22+
// 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.
23+
RunAsUser *int `mandatory:"false" json:"runAsUser"`
24+
25+
// The group ID (GID) to run the entrypoint process of the container. Uses runtime default if not provided.
26+
RunAsGroup *int `mandatory:"false" json:"runAsGroup"`
27+
28+
// 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.
29+
IsNonRootUserCheckEnabled *bool `mandatory:"false" json:"isNonRootUserCheckEnabled"`
30+
31+
// Determines if the container will have a read-only root file system. Default value is false.
32+
IsRootFileSystemReadonly *bool `mandatory:"false" json:"isRootFileSystemReadonly"`
33+
}
34+
35+
func (m CreateLinuxSecurityContextDetails) String() string {
36+
return common.PointerString(m)
37+
}
38+
39+
// ValidateEnumValue returns an error when providing an unsupported enum value
40+
// This function is being called during constructing API request process
41+
// Not recommended for calling this function directly
42+
func (m CreateLinuxSecurityContextDetails) ValidateEnumValue() (bool, error) {
43+
errMessage := []string{}
44+
45+
if len(errMessage) > 0 {
46+
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
47+
}
48+
return false, nil
49+
}
50+
51+
// MarshalJSON marshals to json representation
52+
func (m CreateLinuxSecurityContextDetails) MarshalJSON() (buff []byte, e error) {
53+
type MarshalTypeCreateLinuxSecurityContextDetails CreateLinuxSecurityContextDetails
54+
s := struct {
55+
DiscriminatorParam string `json:"securityContextType"`
56+
MarshalTypeCreateLinuxSecurityContextDetails
57+
}{
58+
"LINUX",
59+
(MarshalTypeCreateLinuxSecurityContextDetails)(m),
60+
}
61+
62+
return json.Marshal(&s)
63+
}
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Copyright (c) 2016, 2018, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// 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.
3+
// Code generated. DO NOT EDIT.
4+
5+
// Container Instance API
6+
//
7+
// A description of the Container Instance API
8+
//
9+
10+
package containerinstances
11+
12+
import (
13+
"encoding/json"
14+
"fmt"
15+
"github.com/oracle/oci-go-sdk/v65/common"
16+
"strings"
17+
)
18+
19+
// CreateSecurityContextDetails Security context for container.
20+
type CreateSecurityContextDetails interface {
21+
}
22+
23+
type createsecuritycontextdetails struct {
24+
JsonData []byte
25+
SecurityContextType string `json:"securityContextType"`
26+
}
27+
28+
// UnmarshalJSON unmarshals json
29+
func (m *createsecuritycontextdetails) UnmarshalJSON(data []byte) error {
30+
m.JsonData = data
31+
type Unmarshalercreatesecuritycontextdetails createsecuritycontextdetails
32+
s := struct {
33+
Model Unmarshalercreatesecuritycontextdetails
34+
}{}
35+
err := json.Unmarshal(data, &s.Model)
36+
if err != nil {
37+
return err
38+
}
39+
m.SecurityContextType = s.Model.SecurityContextType
40+
41+
return err
42+
}
43+
44+
// UnmarshalPolymorphicJSON unmarshals polymorphic json
45+
func (m *createsecuritycontextdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) {
46+
47+
if data == nil || string(data) == "null" {
48+
return nil, nil
49+
}
50+
51+
var err error
52+
switch m.SecurityContextType {
53+
case "LINUX":
54+
mm := CreateLinuxSecurityContextDetails{}
55+
err = json.Unmarshal(data, &mm)
56+
return mm, err
57+
default:
58+
common.Logf("Recieved unsupported enum value for CreateSecurityContextDetails: %s.", m.SecurityContextType)
59+
return *m, nil
60+
}
61+
}
62+
63+
func (m createsecuritycontextdetails) String() string {
64+
return common.PointerString(m)
65+
}
66+
67+
// ValidateEnumValue returns an error when providing an unsupported enum value
68+
// This function is being called during constructing API request process
69+
// Not recommended for calling this function directly
70+
func (m createsecuritycontextdetails) ValidateEnumValue() (bool, error) {
71+
errMessage := []string{}
72+
73+
if len(errMessage) > 0 {
74+
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
75+
}
76+
return false, nil
77+
}

0 commit comments

Comments
 (0)