Skip to content

Commit 5eab4a7

Browse files
authored
[ apiv2 ] KVM and SOL enablement (#1020)
1 parent 00efa36 commit 5eab4a7

12 files changed

Lines changed: 1909 additions & 1242 deletions

File tree

apiv2/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.10.2-dev
1+
2.10.2

apiv2/api/openapi/openapi.yaml

Lines changed: 79 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16278,11 +16278,46 @@ components:
1627816278
title: amt_dns_suffix
1627916279
maxLength: 1024
1628016280
description: (OPTIONAL) textual message that describes dns_suffix for ACM mode.
16281-
desiredConsentCode:
16281+
kvmStatus:
16282+
title: kvm_status
16283+
description: KVM session activation status. Set by kvm-manager only.
16284+
readOnly: true
16285+
$ref: '#/components/schemas/KvmStatus'
16286+
desiredKvmState:
16287+
title: desired_kvm_state
16288+
description: '(OPTIONAL) Desired KVM session state. Written by operator. Valid values: KVM_STATE_START, KVM_STATE_STOP, KVM_CONSENT_RECEIVED, KVM_REDIRECTION_RECEIVED.'
16289+
$ref: '#/components/schemas/KvmState'
16290+
currentKvmState:
16291+
title: current_kvm_state
16292+
description: Current KVM session state. Set by kvm-manager only.
16293+
readOnly: true
16294+
$ref: '#/components/schemas/KvmState'
16295+
kvmSessionStatus:
1628216296
type: string
16283-
title: desired_consent_code
16284-
pattern: ^[0-9]{6}$
16285-
description: '(OPTIONAL) '
16297+
title: kvm_session_status
16298+
maxLength: 1024
16299+
description: Human-readable KVM session status message. Set by kvm-manager only.
16300+
readOnly: true
16301+
solStatus:
16302+
title: sol_status
16303+
description: SOL session activation status. Set by sol-manager only.
16304+
readOnly: true
16305+
$ref: '#/components/schemas/SolStatus'
16306+
desiredSolState:
16307+
title: desired_sol_state
16308+
description: '(OPTIONAL) Desired SOL session state. Written by operator. Valid values: SOL_STATE_START, SOL_STATE_STOP, SOL_STATE_CONSENT_RECEIVED, SOL_STATE_REDIRECTION_RECEIVED.'
16309+
$ref: '#/components/schemas/SolState'
16310+
currentSolState:
16311+
title: current_sol_state
16312+
description: Current SOL session state. Set by sol-manager only.
16313+
readOnly: true
16314+
$ref: '#/components/schemas/SolState'
16315+
solSessionStatus:
16316+
type: string
16317+
title: sol_session_status
16318+
maxLength: 1024
16319+
description: Human-readable SOL session status message. Set by sol-manager only.
16320+
readOnly: true
1628616321
siteId:
1628716322
type: string
1628816323
title: site_id
@@ -16749,6 +16784,26 @@ components:
1674916784
- INSTANCE_STATE_DELETED
1675016785
- INSTANCE_STATE_UNTRUSTED
1675116786
description: The Instance States.
16787+
KvmState:
16788+
type: string
16789+
title: KvmState
16790+
enum:
16791+
- KVM_STATE_UNSPECIFIED
16792+
- KVM_STATE_START
16793+
- KVM_STATE_STOP
16794+
- KVM_STATE_AWAITING_CONSENT
16795+
- KVM_STATE_ERROR
16796+
- KVM_CONSENT_RECEIVED
16797+
- KVM_REDIRECTION_RECEIVED
16798+
description: KVM session lifecycle state; KVM_CONSENT_RECEIVED and KVM_REDIRECTION_RECEIVED are desired-only values.
16799+
KvmStatus:
16800+
type: string
16801+
title: KvmStatus
16802+
enum:
16803+
- KVM_STATUS_UNSPECIFIED
16804+
- KVM_STATUS_ACTIVATED
16805+
- KVM_STATUS_DEACTIVATED
16806+
description: KvmStatus reflects whether a KVM remote session is currently active on the host.
1675216807
LinkState:
1675316808
type: string
1675416809
title: LinkState
@@ -16957,6 +17012,26 @@ components:
1695717012
- POWER_STATE_POWER_CYCLE
1695817013
- POWER_STATE_RESET_REPEAT
1695917014
description: The host power state.
17015+
SolState:
17016+
type: string
17017+
title: SolState
17018+
enum:
17019+
- SOL_STATE_UNSPECIFIED
17020+
- SOL_STATE_START
17021+
- SOL_STATE_STOP
17022+
- SOL_STATE_AWAITING_CONSENT
17023+
- SOL_STATE_ERROR
17024+
- SOL_STATE_CONSENT_RECEIVED
17025+
- SOL_STATE_REDIRECTION_RECEIVED
17026+
description: SOL session lifecycle state; SOL_STATE_CONSENT_RECEIVED and SOL_STATE_REDIRECTION_RECEIVED are desired-only values.
17027+
SolStatus:
17028+
type: string
17029+
title: SolStatus
17030+
enum:
17031+
- SOL_STATUS_UNSPECIFIED
17032+
- SOL_STATUS_ACTIVATED
17033+
- SOL_STATUS_DEACTIVATED
17034+
description: SolStatus reflects whether a SOL remote session is currently active on the host.
1696017035
UpdatePolicy:
1696117036
type: string
1696217037
title: UpdatePolicy

apiv2/api/proto/buf.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ deps:
1010
breaking:
1111
use:
1212
- FILE
13+
ignore_only:
14+
FIELD_NO_DELETE:
15+
- resources/compute/v1/compute.proto
1316
lint:
1417
use:
1518
- STANDARD

apiv2/api/proto/resources/compute/v1/compute.proto

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,42 @@ enum AmtControlMode {
7777
AMT_CONTROL_MODE_CCM = 2;
7878
}
7979

80+
// KvmStatus reflects whether a KVM remote session is currently active on the host.
81+
enum KvmStatus {
82+
KVM_STATUS_UNSPECIFIED = 0;
83+
KVM_STATUS_ACTIVATED = 1;
84+
KVM_STATUS_DEACTIVATED = 2;
85+
}
86+
87+
// KVM session lifecycle state; KVM_CONSENT_RECEIVED and KVM_REDIRECTION_RECEIVED are desired-only values.
88+
enum KvmState {
89+
KVM_STATE_UNSPECIFIED = 0;
90+
KVM_STATE_START = 1;
91+
KVM_STATE_STOP = 2;
92+
KVM_STATE_AWAITING_CONSENT = 3;
93+
KVM_STATE_ERROR = 4;
94+
KVM_CONSENT_RECEIVED = 5;
95+
KVM_REDIRECTION_RECEIVED = 6;
96+
}
97+
98+
// SolStatus reflects whether a SOL remote session is currently active on the host.
99+
enum SolStatus {
100+
SOL_STATUS_UNSPECIFIED = 0;
101+
SOL_STATUS_ACTIVATED = 1;
102+
SOL_STATUS_DEACTIVATED = 2;
103+
}
104+
105+
// SOL session lifecycle state; SOL_STATE_CONSENT_RECEIVED and SOL_STATE_REDIRECTION_RECEIVED are desired-only values.
106+
enum SolState {
107+
SOL_STATE_UNSPECIFIED = 0;
108+
SOL_STATE_START = 1;
109+
SOL_STATE_STOP = 2;
110+
SOL_STATE_AWAITING_CONSENT = 3;
111+
SOL_STATE_ERROR = 4;
112+
SOL_STATE_CONSENT_RECEIVED = 5;
113+
SOL_STATE_REDIRECTION_RECEIVED = 6;
114+
}
115+
80116
// A Host resource.
81117
message HostResource {
82118
// Resource ID, generated on Create.
@@ -234,12 +270,31 @@ message HostResource {
234270
(buf.validate.field).string = {max_len: 1024}
235271
]; // textual message that describes dns_suffix for ACM mode.
236272

237-
string desired_consent_code = 106 [
238-
(google.api.field_behavior) = OPTIONAL,
239-
(buf.validate.field).string = {pattern: "^[0-9]{6}$"},
240-
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
273+
// KVM session activation status. Set by kvm-manager only.
274+
KvmStatus kvm_status = 88 [(google.api.field_behavior) = OUTPUT_ONLY];
275+
// Desired KVM session state. Written by operator. Valid values: KVM_STATE_START, KVM_STATE_STOP, KVM_CONSENT_RECEIVED, KVM_REDIRECTION_RECEIVED.
276+
KvmState desired_kvm_state = 101 [(google.api.field_behavior) = OPTIONAL];
277+
// Current KVM session state. Set by kvm-manager only.
278+
KvmState current_kvm_state = 102 [(google.api.field_behavior) = OUTPUT_ONLY];
279+
// Human-readable KVM session status message. Set by kvm-manager only.
280+
string kvm_session_status = 104 [
281+
(google.api.field_behavior) = OUTPUT_ONLY,
282+
(buf.validate.field).string = {max_len: 1024}
241283
];
242284

285+
reserved 106; reserved "desired_consent_code";
286+
287+
// SOL session activation status. Set by sol-manager only.
288+
SolStatus sol_status = 108 [(google.api.field_behavior) = OUTPUT_ONLY];
289+
// Desired SOL session state. Written by operator. Valid values: SOL_STATE_START, SOL_STATE_STOP, SOL_STATE_CONSENT_RECEIVED, SOL_STATE_REDIRECTION_RECEIVED.
290+
SolState desired_sol_state = 109 [(google.api.field_behavior) = OPTIONAL];
291+
// Current SOL session state. Set by sol-manager only.
292+
SolState current_sol_state = 110 [(google.api.field_behavior) = OUTPUT_ONLY];
293+
// Human-readable SOL session status message. Set by sol-manager only.
294+
string sol_session_status = 112 [
295+
(google.api.field_behavior) = OUTPUT_ONLY,
296+
(buf.validate.field).string = {max_len: 1024}
297+
];
243298

244299
// The site where the host is located.
245300
string site_id = 5001 [

apiv2/docs/proto.md

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@
6161
- [HostState](#resources-compute-v1-HostState)
6262
- [InstanceKind](#resources-compute-v1-InstanceKind)
6363
- [InstanceState](#resources-compute-v1-InstanceState)
64+
- [KvmState](#resources-compute-v1-KvmState)
65+
- [KvmStatus](#resources-compute-v1-KvmStatus)
6466
- [LinkState](#resources-compute-v1-LinkState)
6567
- [PowerCommandPolicy](#resources-compute-v1-PowerCommandPolicy)
6668
- [PowerState](#resources-compute-v1-PowerState)
69+
- [SolState](#resources-compute-v1-SolState)
70+
- [SolStatus](#resources-compute-v1-SolStatus)
6771
- [UpdatePolicy](#resources-compute-v1-UpdatePolicy)
6872
- [WorkloadKind](#resources-compute-v1-WorkloadKind)
6973
- [WorkloadMemberKind](#resources-compute-v1-WorkloadMemberKind)
@@ -811,7 +815,14 @@ A Host resource.
811815
| user_lvm_size | [uint32](#uint32) | | LVM size in GB. |
812816
| amt_control_mode | [AmtControlMode](#resources-compute-v1-AmtControlMode) | | coming from user selection |
813817
| amt_dns_suffix | [string](#string) | | textual message that describes dns_suffix for ACM mode. |
814-
| desired_consent_code | [string](#string) | | |
818+
| kvm_status | [KvmStatus](#resources-compute-v1-KvmStatus) | | KVM session activation status. Set by kvm-manager only. |
819+
| desired_kvm_state | [KvmState](#resources-compute-v1-KvmState) | | Desired KVM session state. Written by operator. Valid values: KVM_STATE_START, KVM_STATE_STOP, KVM_CONSENT_RECEIVED, KVM_REDIRECTION_RECEIVED. |
820+
| current_kvm_state | [KvmState](#resources-compute-v1-KvmState) | | Current KVM session state. Set by kvm-manager only. |
821+
| kvm_session_status | [string](#string) | | Human-readable KVM session status message. Set by kvm-manager only. |
822+
| sol_status | [SolStatus](#resources-compute-v1-SolStatus) | | SOL session activation status. Set by sol-manager only. |
823+
| desired_sol_state | [SolState](#resources-compute-v1-SolState) | | Desired SOL session state. Written by operator. Valid values: SOL_STATE_START, SOL_STATE_STOP, SOL_STATE_CONSENT_RECEIVED, SOL_STATE_REDIRECTION_RECEIVED. |
824+
| current_sol_state | [SolState](#resources-compute-v1-SolState) | | Current SOL session state. Set by sol-manager only. |
825+
| sol_session_status | [string](#string) | | Human-readable SOL session status message. Set by sol-manager only. |
815826
| site_id | [string](#string) | | The site where the host is located. |
816827
| metadata | [resources.common.v1.MetadataItem](#resources-common-v1-MetadataItem) | repeated | The metadata associated with the host, represented by a list of key:value pairs. |
817828
| inherited_metadata | [resources.common.v1.MetadataItem](#resources-common-v1-MetadataItem) | repeated | The metadata inherited by the host, represented by a list of key:value pairs, rendered by location and logical structures. |
@@ -1186,6 +1197,36 @@ The Instance States.
11861197

11871198

11881199

1200+
<a name="resources-compute-v1-KvmState"></a>
1201+
1202+
### KvmState
1203+
KVM session lifecycle state; KVM_CONSENT_RECEIVED and KVM_REDIRECTION_RECEIVED are desired-only values.
1204+
1205+
| Name | Number | Description |
1206+
| ---- | ------ | ----------- |
1207+
| KVM_STATE_UNSPECIFIED | 0 | |
1208+
| KVM_STATE_START | 1 | |
1209+
| KVM_STATE_STOP | 2 | |
1210+
| KVM_STATE_AWAITING_CONSENT | 3 | |
1211+
| KVM_STATE_ERROR | 4 | |
1212+
| KVM_CONSENT_RECEIVED | 5 | |
1213+
| KVM_REDIRECTION_RECEIVED | 6 | |
1214+
1215+
1216+
1217+
<a name="resources-compute-v1-KvmStatus"></a>
1218+
1219+
### KvmStatus
1220+
KvmStatus reflects whether a KVM remote session is currently active on the host.
1221+
1222+
| Name | Number | Description |
1223+
| ---- | ------ | ----------- |
1224+
| KVM_STATUS_UNSPECIFIED | 0 | |
1225+
| KVM_STATUS_ACTIVATED | 1 | |
1226+
| KVM_STATUS_DEACTIVATED | 2 | |
1227+
1228+
1229+
11891230
<a name="resources-compute-v1-LinkState"></a>
11901231

11911232
### LinkState
@@ -1230,6 +1271,36 @@ The host power state.
12301271

12311272

12321273

1274+
<a name="resources-compute-v1-SolState"></a>
1275+
1276+
### SolState
1277+
SOL session lifecycle state; SOL_STATE_CONSENT_RECEIVED and SOL_STATE_REDIRECTION_RECEIVED are desired-only values.
1278+
1279+
| Name | Number | Description |
1280+
| ---- | ------ | ----------- |
1281+
| SOL_STATE_UNSPECIFIED | 0 | |
1282+
| SOL_STATE_START | 1 | |
1283+
| SOL_STATE_STOP | 2 | |
1284+
| SOL_STATE_AWAITING_CONSENT | 3 | |
1285+
| SOL_STATE_ERROR | 4 | |
1286+
| SOL_STATE_CONSENT_RECEIVED | 5 | |
1287+
| SOL_STATE_REDIRECTION_RECEIVED | 6 | |
1288+
1289+
1290+
1291+
<a name="resources-compute-v1-SolStatus"></a>
1292+
1293+
### SolStatus
1294+
SolStatus reflects whether a SOL remote session is currently active on the host.
1295+
1296+
| Name | Number | Description |
1297+
| ---- | ------ | ----------- |
1298+
| SOL_STATUS_UNSPECIFIED | 0 | |
1299+
| SOL_STATUS_ACTIVATED | 1 | |
1300+
| SOL_STATUS_DEACTIVATED | 2 | |
1301+
1302+
1303+
12331304
<a name="resources-compute-v1-UpdatePolicy"></a>
12341305

12351306
### UpdatePolicy

apiv2/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/labstack/echo-contrib v0.50.1
1717
github.com/labstack/echo/v4 v4.15.1
1818
github.com/oapi-codegen/runtime v1.1.1
19-
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.0
19+
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.1
2020
github.com/open-edge-platform/orch-library/go v0.6.4-0.20260211092341-cfad67ad247d
2121
github.com/prometheus/client_golang v1.23.2
2222
github.com/stretchr/testify v1.11.1

apiv2/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,8 +1056,8 @@ github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//J
10561056
github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw=
10571057
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c=
10581058
github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o=
1059-
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.0 h1:NlKK7Kh3x9JUB+dLwtSYfbyvG2nE+zy1FhNP/2Frh1c=
1060-
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.0/go.mod h1:WNM18zJ5iCFR9LgESM4RT/jgo+oicNrfdwtaOh19EHA=
1059+
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.1 h1:jBLsuc9+7FVW212d10cnaR+2p4XrTlgK3uWeJUMkwjY=
1060+
github.com/open-edge-platform/infra-core/inventory/v2 v2.35.1/go.mod h1:wiWvyzTr13rOplddY7Mikmd46z5JR6sKDFdl2woEm1c=
10611061
github.com/open-edge-platform/orch-library/go v0.6.4-0.20260211092341-cfad67ad247d h1:xRow90Mk5U2h+R60TTL8lPXIFbdQWSnHyg09vh8NEPo=
10621062
github.com/open-edge-platform/orch-library/go v0.6.4-0.20260211092341-cfad67ad247d/go.mod h1:mYhs/KbcXPQWM+2cHZXyzeIIzM7xKvnNgsnHlFkXH0g=
10631063
github.com/open-edge-platform/orch-library/go/dazl v0.5.4 h1:Rx/bSAZiLjEEBjUiJEzBvT0fQv5huT5FQ2Ke3IMUhiE=

0 commit comments

Comments
 (0)