Skip to content

feat: Changes to Instance for day2 in API #173

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

Merged
merged 18 commits into from
May 28, 2025
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
22 changes: 18 additions & 4 deletions apiv2/api/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4980,12 +4980,12 @@ components:
$ref: '#/components/schemas/OperatingSystemResource'
desiredOs:
title: desired_os
description: OS resource that should be installed to this Instance.
description: Deprecated, will be removed in EMF v3.2.0, use OSUpdatePolicy for driving day2, and os for day0 operations instead. OS resource that should be installed to this Instance.
readOnly: true
$ref: '#/components/schemas/OperatingSystemResource'
currentOs:
title: current_os
description: OS resource that is currently installed for this Instance.
description: Deprecated, will be removed in EMF v3.2.0, use os field instead. OS resource that is currently installed for this Instance.
readOnly: true
$ref: '#/components/schemas/OperatingSystemResource'
securityFeature:
Expand Down Expand Up @@ -5044,7 +5044,7 @@ components:
type: string
title: update_status_detail
maxLength: 100000
description: JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change.
description: Deprecated, will be removed in EMF v3.2.0, use OSUpdateRun instead. JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change.
readOnly: true
trustedAttestationStatus:
type: string
Expand Down Expand Up @@ -5093,6 +5093,20 @@ components:
pattern: ^$|^[a-zA-Z-_0-9./:;=@?!#,<>*+~()"\ \n{}[]]+$
description: The CVEs that are currently present on the Instance, encoded as a JSON list.
readOnly: true
runtimePackages:
type: string
title: runtime_packages
maxLength: 500000
pattern: ^$|^[a-zA-Z-_0-9./:;=@?!#,<>*+~()"\ \n{}[]]+$
description: The packages available on the Instance at runtime, represented as a JSON list.
readOnly: true
osUpdateAvailable:
type: string
title: os_update_available
maxLength: 10000
pattern: ^$|^[a-zA-Z-_0-9./:;=?@!#,<>*()"\ \n]+$
description: Details about OS Updates available for this Instance. If empty, there are no updates available.
readOnly: true
instanceID:
type: string
title: instanceID
Expand All @@ -5112,7 +5126,7 @@ components:
title: osID
maxLength: 11
pattern: ^os-[0-9a-f]{8}$
description: The unique identifier of OS resource that must be installed on the instance.
description: The unique identifier of OS resource that must be installed on the instance. The field is used to drive the day0 operations, and immutable once set the first time.
writeOnly: true
localAccountID:
type: string
Expand Down
28 changes: 23 additions & 5 deletions apiv2/api/proto/resources/compute/v1/compute.proto
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ message InstanceResource {
HostResource host = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// OS resource that should be installed to this Instance.
resources.os.v1.OperatingSystemResource os = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// OS resource that should be installed to this Instance.
// Deprecated, will be removed in EMF v3.2.0, use OSUpdatePolicy for driving day2, and os for day0 operations instead. OS resource that should be installed to this Instance.
resources.os.v1.OperatingSystemResource desired_os = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// OS resource that is currently installed for this Instance.
// Deprecated, will be removed in EMF v3.2.0, use os field instead. OS resource that is currently installed for this Instance.
resources.os.v1.OperatingSystemResource current_os = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
// Select to enable security features such as Secure Boot (SB) and Full Disk Encryption (FDE).
resources.os.v1.SecurityFeature security_feature = 14;
Expand Down Expand Up @@ -382,7 +382,7 @@ message InstanceResource {
status.v1.StatusIndication update_status_indicator = 22 [(google.api.field_behavior) = OUTPUT_ONLY];
// UTC timestamp when update_status was last changed. Set by RMs only.
uint32 update_status_timestamp = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
// JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change.
// Deprecated, will be removed in EMF v3.2.0, use OSUpdateRun instead. JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change.
string update_status_detail = 24 [(buf.validate.field).string = {max_len: 100000},
(google.api.field_behavior) = OUTPUT_ONLY
];
Expand Down Expand Up @@ -413,7 +413,7 @@ message InstanceResource {
pattern: '^$|^[a-zA-Z-_0-9./:;=?@!#,<>*() ]+$'
},
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
];
];

// The CVEs that are currently present on the Instance, encoded as a JSON list.
string existing_cves = 42 [
Expand All @@ -424,6 +424,24 @@ message InstanceResource {
}
];

// The packages available on the Instance at runtime, represented as a JSON list.
string runtime_packages = 51 [
(google.api.field_behavior) = OUTPUT_ONLY,
(buf.validate.field).string = {
pattern: "^$|^[a-zA-Z-_0-9./:;=@?!#,<>*+~()\"\\ \\n{}[]]+$"
max_len: 500000
}
];

// Details about OS Updates available for this Instance. If empty, there are no updates available.
string os_update_available = 52 [
(google.api.field_behavior) = OUTPUT_ONLY,
(buf.validate.field).string = {
pattern: '^$|^[a-zA-Z-_0-9./:;=?@!#,<>*()\"\\ \\n]+$'
max_len: 10000
}
];

// Deprecated, The instance's unique identifier. Alias of resourceID.
string instanceID = 5001 [
(google.api.field_behavior) = OUTPUT_ONLY,
Expand All @@ -442,7 +460,7 @@ message InstanceResource {
}
];

// The unique identifier of OS resource that must be installed on the instance.
// The unique identifier of OS resource that must be installed on the instance. The field is used to drive the day0 operations, and immutable once set the first time.
string osID = 5003 [
(google.api.field_behavior) = INPUT_ONLY,
(buf.validate.field).string = {
Expand Down
10 changes: 6 additions & 4 deletions apiv2/docs/proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,8 @@ host or hypervisor.
| current_state | [InstanceState](#resources-compute-v1-InstanceState) | | The Instance current state. |
| host | [HostResource](#resources-compute-v1-HostResource) | | Host this Instance is placed on. Only applicable to baremetal instances. |
| os | [resources.os.v1.OperatingSystemResource](#resources-os-v1-OperatingSystemResource) | | OS resource that should be installed to this Instance. |
| desired_os | [resources.os.v1.OperatingSystemResource](#resources-os-v1-OperatingSystemResource) | | OS resource that should be installed to this Instance. |
| current_os | [resources.os.v1.OperatingSystemResource](#resources-os-v1-OperatingSystemResource) | | OS resource that is currently installed for this Instance. |
| desired_os | [resources.os.v1.OperatingSystemResource](#resources-os-v1-OperatingSystemResource) | | Deprecated, will be removed in EMF v3.2.0, use OSUpdatePolicy for driving day2, and os for day0 operations instead. OS resource that should be installed to this Instance. |
| current_os | [resources.os.v1.OperatingSystemResource](#resources-os-v1-OperatingSystemResource) | | Deprecated, will be removed in EMF v3.2.0, use os field instead. OS resource that is currently installed for this Instance. |
| security_feature | [resources.os.v1.SecurityFeature](#resources-os-v1-SecurityFeature) | | Select to enable security features such as Secure Boot (SB) and Full Disk Encryption (FDE). |
| instance_status | [string](#string) | | textual message that describes the current instance status. Set by RMs only. |
| instance_status_indicator | [resources.status.v1.StatusIndication](#resources-status-v1-StatusIndication) | | Indicates interpretation of instance_status. Set by RMs only. |
Expand All @@ -874,7 +874,7 @@ host or hypervisor.
| update_status | [string](#string) | | textual message that describes the update status of Instance. Set by RMs only. |
| update_status_indicator | [resources.status.v1.StatusIndication](#resources-status-v1-StatusIndication) | | Indicates interpretation of update_status. Set by RMs only. |
| update_status_timestamp | [uint32](#uint32) | | UTC timestamp when update_status was last changed. Set by RMs only. |
| update_status_detail | [string](#string) | | JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change. |
| update_status_detail | [string](#string) | | Deprecated, will be removed in EMF v3.2.0, use OSUpdateRun instead. JSON field storing details of Instance update status. Set by RMs only. Beta, subject to change. |
| trusted_attestation_status | [string](#string) | | textual message that describes the trusted_attestation status of Instance. Set by RMs only. |
| trusted_attestation_status_indicator | [resources.status.v1.StatusIndication](#resources-status-v1-StatusIndication) | | Indicates interpretation of trusted_attestation_status. Set by RMs only. |
| trusted_attestation_status_timestamp | [uint32](#uint32) | | UTC timestamp when trusted_attestation_status was last changed. Set by RMs only. |
Expand All @@ -885,9 +885,11 @@ back-reference to the Workload Members associated to this Instance |
| update_policy | [OSUpdatePolicy](#resources-compute-v1-OSUpdatePolicy) | | Update Policy of this Instance |
| instance_status_detail | [string](#string) | | Textual message that gives detailed status of the instance&#39;s software components. |
| existing_cves | [string](#string) | | The CVEs that are currently present on the Instance, encoded as a JSON list. |
| runtime_packages | [string](#string) | | The packages available on the Instance at runtime, represented as a JSON list. |
| os_update_available | [string](#string) | | Details about OS Updates available for this Instance. If empty, there are no updates available. |
| instanceID | [string](#string) | | Deprecated, The instance&#39;s unique identifier. Alias of resourceID. |
| hostID | [string](#string) | | The host&#39;s unique identifier associated with the instance. |
| osID | [string](#string) | | The unique identifier of OS resource that must be installed on the instance. |
| osID | [string](#string) | | The unique identifier of OS resource that must be installed on the instance. The field is used to drive the day0 operations, and immutable once set the first time. |
| local_accountID | [string](#string) | | The unique identifier of local account will be associated with the instance. |
| os_update_policyID | [string](#string) | | |
| timestamps | [resources.common.v1.Timestamps](#resources-common-v1-Timestamps) | | Timestamps associated to the resource. |
Expand Down
Loading
Loading