From 71bd2313c5125db9f9ad68a264eb8d9a14ee4fd3 Mon Sep 17 00:00:00 2001 From: Gavin Lewis Date: Wed, 4 Sep 2024 09:51:53 -0700 Subject: [PATCH 1/5] Update maximus workflow files per Nirmal email --- .github/workflows/CODE_REVIEW_REPORT.yml | 2 +- .github/workflows/DEVELOPER_ASSISTANT.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CODE_REVIEW_REPORT.yml b/.github/workflows/CODE_REVIEW_REPORT.yml index 974b0727a..eaefbd9cd 100644 --- a/.github/workflows/CODE_REVIEW_REPORT.yml +++ b/.github/workflows/CODE_REVIEW_REPORT.yml @@ -11,7 +11,7 @@ jobs: pull-requests: write if: (contains(github.event.comment.body, '/generate_report') && github.event.comment.user.login != 'nex-maximus') || github.event_name == 'pull_request' && github.event.pull_request.user.login != 'nex-maximus' - runs-on: [self-hosted, maximus-unit-test] + runs-on: [intel-ubuntu-latest, maximus-unit-test] steps: - name: PR Agent action step id: pragent diff --git a/.github/workflows/DEVELOPER_ASSISTANT.yaml b/.github/workflows/DEVELOPER_ASSISTANT.yaml index b89011325..e7755df44 100644 --- a/.github/workflows/DEVELOPER_ASSISTANT.yaml +++ b/.github/workflows/DEVELOPER_ASSISTANT.yaml @@ -15,7 +15,7 @@ jobs: contains(github.event.comment.body, '/add_docs') || contains(github.event.comment.body, '/update_changelog')) && github.event.comment.user.login != 'nex-maximus') || github.event_name == 'pull_request' && github.event.pull_request.user.login != 'nex-maximus' - runs-on: [self-hosted, smart-devops-code-review] + runs-on: [intel-ubuntu-latest, smart-devops-code-review] steps: - name: PR Agent action step id: pragent From ee1fe65b40d567a550edd39fdd0ef8d1b1ff3ee0 Mon Sep 17 00:00:00 2001 From: Gavin Lewis Date: Wed, 4 Sep 2024 19:40:36 -0700 Subject: [PATCH 2/5] Add changes needed for TiberOS .spec/.rpm (#545) --- inbc-program/inbc/inbc.py | 2 ++ inbm/cloudadapter-agent/cloudadapter/cloudadapter.py | 2 +- inbm/configuration-agent/configuration/configuration.py | 2 +- inbm/diagnostic-agent/diagnostic/diagnostic.py | 2 +- inbm/dispatcher-agent/dispatcher/dispatcher.py | 2 ++ inbm/telemetry-agent/telemetry/telemetry.py | 2 +- inbm/trtl/go.sum | 5 +++++ 7 files changed, 13 insertions(+), 4 deletions(-) diff --git a/inbc-program/inbc/inbc.py b/inbc-program/inbc/inbc.py index f0d911129..9f735a74a 100644 --- a/inbc-program/inbc/inbc.py +++ b/inbc-program/inbc/inbc.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + """Command-line INBC tool to invoke Software update on the device with manageability framework. Copyright (C) 2020-2024 Intel Corporation diff --git a/inbm/cloudadapter-agent/cloudadapter/cloudadapter.py b/inbm/cloudadapter-agent/cloudadapter/cloudadapter.py index caa52b092..df3227dd0 100644 --- a/inbm/cloudadapter-agent/cloudadapter/cloudadapter.py +++ b/inbm/cloudadapter-agent/cloudadapter/cloudadapter.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 """ Agent that monitors and reports the state of critical components of the framework diff --git a/inbm/configuration-agent/configuration/configuration.py b/inbm/configuration-agent/configuration/configuration.py index edad4ad18..03d079b9c 100755 --- a/inbm/configuration-agent/configuration/configuration.py +++ b/inbm/configuration-agent/configuration/configuration.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 """ Central configuration-agent/configuration service for the manageability framework diff --git a/inbm/diagnostic-agent/diagnostic/diagnostic.py b/inbm/diagnostic-agent/diagnostic/diagnostic.py index 4076d7016..59419cfd0 100755 --- a/inbm/diagnostic-agent/diagnostic/diagnostic.py +++ b/inbm/diagnostic-agent/diagnostic/diagnostic.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 """ Agent which monitors and reports the state of critical components of the framework diff --git a/inbm/dispatcher-agent/dispatcher/dispatcher.py b/inbm/dispatcher-agent/dispatcher/dispatcher.py index 42c494add..e67d12b1d 100644 --- a/inbm/dispatcher-agent/dispatcher/dispatcher.py +++ b/inbm/dispatcher-agent/dispatcher/dispatcher.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 + """ Main .py file for Dispatcher agent -- contains main() method diff --git a/inbm/telemetry-agent/telemetry/telemetry.py b/inbm/telemetry-agent/telemetry/telemetry.py index 8008b7521..527175627 100644 --- a/inbm/telemetry-agent/telemetry/telemetry.py +++ b/inbm/telemetry-agent/telemetry/telemetry.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -*- coding: utf-8 -*- """ diff --git a/inbm/trtl/go.sum b/inbm/trtl/go.sum index 706095942..6b24c08f6 100644 --- a/inbm/trtl/go.sum +++ b/inbm/trtl/go.sum @@ -113,6 +113,7 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -143,6 +144,7 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -165,6 +167,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -284,6 +287,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -337,6 +341,7 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= From 551d99a31e8bd78ef05b4fc231b924cda7ea1d78 Mon Sep 17 00:00:00 2001 From: Gavin Lewis Date: Wed, 4 Sep 2024 19:45:08 -0700 Subject: [PATCH 3/5] release 4.2.5 --- inbm/Changelog.md | 5 +++-- .../recipes-inb/inb/{inb_0.0.0.bb => inb_4.2.5.bb} | 0 inbm/version.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/{inb_0.0.0.bb => inb_4.2.5.bb} (100%) diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 13cd52460..903ef6b74 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -3,8 +3,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## NEXT - YYYY-MM-DD - +## 4.2.5 - 2024-09-04 +### Fixed + - Added #!/usr/bin/python3 lines to agents to work in source install mode. ## 4.2.4.3 - 2024-08-27 ### Fixed diff --git a/inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_0.0.0.bb b/inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_4.2.5.bb similarity index 100% rename from inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_0.0.0.bb rename to inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_4.2.5.bb diff --git a/inbm/version.txt b/inbm/version.txt index 77d6f4ca2..df0228dfa 100644 --- a/inbm/version.txt +++ b/inbm/version.txt @@ -1 +1 @@ -0.0.0 +4.2.5 From f23246e44749f0ce89d080dfbc755fd5b3617b1d Mon Sep 17 00:00:00 2001 From: Gavin Lewis Date: Wed, 4 Sep 2024 19:46:05 -0700 Subject: [PATCH 4/5] Reset versions to 0.0.0. --- inbm/Changelog.md | 2 ++ .../recipes-inb/inb/{inb_4.2.5.bb => inb_0.0.0.bb} | 0 inbm/version.txt | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) rename inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/{inb_4.2.5.bb => inb_0.0.0.bb} (100%) diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 903ef6b74..5d20077a6 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## NEXT - YYYY-MM-DD + ## 4.2.5 - 2024-09-04 ### Fixed - Added #!/usr/bin/python3 lines to agents to work in source install mode. diff --git a/inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_4.2.5.bb b/inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_0.0.0.bb similarity index 100% rename from inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_4.2.5.bb rename to inbm/packaging/yocto/meta-intel-ese-manageability/recipes-inb/inb/inb_0.0.0.bb diff --git a/inbm/version.txt b/inbm/version.txt index df0228dfa..77d6f4ca2 100644 --- a/inbm/version.txt +++ b/inbm/version.txt @@ -1 +1 @@ -4.2.5 +0.0.0 From f1a280868a52cb41ebce580a07c5db8b61d436d6 Mon Sep 17 00:00:00 2001 From: Gavin Lewis Date: Fri, 6 Sep 2024 14:54:02 -0700 Subject: [PATCH 5/5] (NEXMANAGE-614) Update proto definition/stubs for INBS APIs sending messages from node NB (#546) --- inbm/Changelog.md | 3 + .../cloudadapter/pb/common/v1/common_pb2.py | 8 +- .../cloudadapter/pb/common/v1/common_pb2.pyi | 174 +++-- .../cloudadapter/pb/inbs/v1/inbs_sb_pb2.py | 10 +- .../cloudadapter/pb/inbs/v1/inbs_sb_pb2.pyi | 77 ++- .../pb/inbs/v1/inbs_sb_pb2_grpc.py | 34 + inbm/proto/common/v1/common.proto | 34 + inbm/proto/inbs-mock/pb/common.pb.go | 605 ++++++++++++++---- inbm/proto/inbs-mock/pb/inbs_sb.pb.go | 226 ++++++- inbm/proto/inbs-mock/pb/inbs_sb_grpc.pb.go | 57 +- inbm/proto/inbs/v1/inbs_sb.proto | 18 +- 11 files changed, 1013 insertions(+), 233 deletions(-) diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 5d20077a6..61fc5c4b1 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ## NEXT - YYYY-MM-DD +### Added + - Updated proto files to add new RPC calls to allow edge node to update + its status with INBS. ## 4.2.5 - 2024-09-04 ### Fixed diff --git a/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.py b/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.py index 2adcf67b1..759a967c9 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.py +++ b/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x63ommon/v1/common.proto\x12\tcommon.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\x18\n\x05\x45rror\x12\x0f\n\x07message\x18\x01 \x01(\t\"g\n\x17NodeScheduledOperations\x12;\n\x14scheduled_operations\x18\x01 \x03(\x0b\x32\x1d.common.v1.ScheduledOperation\x12\x0f\n\x07node_id\x18\x02 \x01(\t\"e\n\x12ScheduledOperation\x12\'\n\toperation\x18\x01 \x01(\x0b\x32\x14.common.v1.Operation\x12&\n\tschedules\x18\x02 \x03(\x0b\x32\x13.common.v1.Schedule\"\x86\x01\n\x08Schedule\x12\x34\n\x0fsingle_schedule\x18\x01 \x01(\x0b\x32\x19.common.v1.SingleScheduleH\x00\x12\x38\n\x11repeated_schedule\x18\x02 \x01(\x0b\x32\x1b.common.v1.RepeatedScheduleH\x00\x42\n\n\x08schedule\"~\n\x0eSingleSchedule\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbc\x01\n\x10RepeatedSchedule\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x63ron_minutes\x18\x03 \x01(\t\x12\x12\n\ncron_hours\x18\x04 \x01(\t\x12\x16\n\x0e\x63ron_day_month\x18\x05 \x01(\t\x12\x12\n\ncron_month\x18\x06 \x01(\t\x12\x15\n\rcron_day_week\x18\x07 \x01(\t\"\xe2\x03\n\tOperation\x12/\n\x0epre_operations\x18\x01 \x03(\x0b\x32\x17.common.v1.PreOperation\x12\x31\n\x0fpost_operations\x18\x02 \x03(\x0b\x32\x18.common.v1.PostOperation\x12\x36\n\x0cservice_type\x18\x03 \x01(\x0e\x32 .common.v1.Operation.ServiceType\x12T\n update_system_software_operation\x18\x04 \x01(\x0b\x32(.common.v1.UpdateSystemSoftwareOperationH\x00\x12\x46\n\x19set_power_state_operation\x18\x05 \x01(\x0b\x32!.common.v1.SetPowerStateOperationH\x00\"\x8d\x01\n\x0bServiceType\x12\x1c\n\x18SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11SERVICE_TYPE_INBS\x10\x01\x12\x18\n\x14SERVICE_TYPE_OOB_AMT\x10\x02\x12\x18\n\x14SERVICE_TYPE_OOB_BMC\x10\x03\x12\x15\n\x11SERVICE_TYPE_AUTO\x10\x04\x42\x0b\n\toperation\"\xd8\x02\n\x1dUpdateSystemSoftwareOperation\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x30\n\x0crelease_date\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x04mode\x18\x03 \x01(\x0e\x32\x35.common.v1.UpdateSystemSoftwareOperation.DownloadMode\x12\x15\n\rdo_not_reboot\x18\x04 \x01(\x08\x12\x14\n\x0cpackage_list\x18\x05 \x03(\t\"\x85\x01\n\x0c\x44ownloadMode\x12\x1d\n\x19\x44OWNLOAD_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44OWNLOAD_MODE_FULL\x10\x01\x12\x1d\n\x19\x44OWNLOAD_MODE_NO_DOWNLOAD\x10\x02\x12\x1f\n\x1b\x44OWNLOAD_MODE_DOWNLOAD_ONLY\x10\x03\"\xd9\x01\n\x16SetPowerStateOperation\x12<\n\x06opcode\x18\x01 \x01(\x0e\x32,.common.v1.SetPowerStateOperation.PowerState\"\x80\x01\n\nPowerState\x12\x1b\n\x17POWER_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0ePOWER_STATE_ON\x10\x02\x12\x15\n\x11POWER_STATE_CYCLE\x10\x05\x12\x13\n\x0fPOWER_STATE_OFF\x10\x08\x12\x15\n\x11POWER_STATE_RESET\x10\n\"\x0e\n\x0cPreOperation\"\x0f\n\rPostOperationb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x16\x63ommon/v1/common.proto\x12\tcommon.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\x18\n\x05\x45rror\x12\x0f\n\x07message\x18\x01 \x01(\t\"g\n\x17NodeScheduledOperations\x12;\n\x14scheduled_operations\x18\x01 \x03(\x0b\x32\x1d.common.v1.ScheduledOperation\x12\x0f\n\x07node_id\x18\x02 \x01(\t\"e\n\x12ScheduledOperation\x12\'\n\toperation\x18\x01 \x01(\x0b\x32\x14.common.v1.Operation\x12&\n\tschedules\x18\x02 \x03(\x0b\x32\x13.common.v1.Schedule\"\x86\x01\n\x08Schedule\x12\x34\n\x0fsingle_schedule\x18\x01 \x01(\x0b\x32\x19.common.v1.SingleScheduleH\x00\x12\x38\n\x11repeated_schedule\x18\x02 \x01(\x0b\x32\x1b.common.v1.RepeatedScheduleH\x00\x42\n\n\x08schedule\"~\n\x0eSingleSchedule\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12.\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xbc\x01\n\x10RepeatedSchedule\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12+\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x14\n\x0c\x63ron_minutes\x18\x03 \x01(\t\x12\x12\n\ncron_hours\x18\x04 \x01(\t\x12\x16\n\x0e\x63ron_day_month\x18\x05 \x01(\t\x12\x12\n\ncron_month\x18\x06 \x01(\t\x12\x15\n\rcron_day_week\x18\x07 \x01(\t\"\xe2\x03\n\tOperation\x12/\n\x0epre_operations\x18\x01 \x03(\x0b\x32\x17.common.v1.PreOperation\x12\x31\n\x0fpost_operations\x18\x02 \x03(\x0b\x32\x18.common.v1.PostOperation\x12\x36\n\x0cservice_type\x18\x03 \x01(\x0e\x32 .common.v1.Operation.ServiceType\x12T\n update_system_software_operation\x18\x04 \x01(\x0b\x32(.common.v1.UpdateSystemSoftwareOperationH\x00\x12\x46\n\x19set_power_state_operation\x18\x05 \x01(\x0b\x32!.common.v1.SetPowerStateOperationH\x00\"\x8d\x01\n\x0bServiceType\x12\x1c\n\x18SERVICE_TYPE_UNSPECIFIED\x10\x00\x12\x15\n\x11SERVICE_TYPE_INBS\x10\x01\x12\x18\n\x14SERVICE_TYPE_OOB_AMT\x10\x02\x12\x18\n\x14SERVICE_TYPE_OOB_BMC\x10\x03\x12\x15\n\x11SERVICE_TYPE_AUTO\x10\x04\x42\x0b\n\toperation\"\xd8\x02\n\x1dUpdateSystemSoftwareOperation\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x30\n\x0crelease_date\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x43\n\x04mode\x18\x03 \x01(\x0e\x32\x35.common.v1.UpdateSystemSoftwareOperation.DownloadMode\x12\x15\n\rdo_not_reboot\x18\x04 \x01(\x08\x12\x14\n\x0cpackage_list\x18\x05 \x03(\t\"\x85\x01\n\x0c\x44ownloadMode\x12\x1d\n\x19\x44OWNLOAD_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44OWNLOAD_MODE_FULL\x10\x01\x12\x1d\n\x19\x44OWNLOAD_MODE_NO_DOWNLOAD\x10\x02\x12\x1f\n\x1b\x44OWNLOAD_MODE_DOWNLOAD_ONLY\x10\x03\"\xd9\x01\n\x16SetPowerStateOperation\x12<\n\x06opcode\x18\x01 \x01(\x0e\x32,.common.v1.SetPowerStateOperation.PowerState\"\x80\x01\n\nPowerState\x12\x1b\n\x17POWER_STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0ePOWER_STATE_ON\x10\x02\x12\x15\n\x11POWER_STATE_CYCLE\x10\x05\x12\x13\n\x0fPOWER_STATE_OFF\x10\x08\x12\x15\n\x11POWER_STATE_RESET\x10\n\"\x0e\n\x0cPreOperation\"\x0f\n\rPostOperation\"\xc9\x04\n\x03Job\x12\x0e\n\x06job_id\x18\x01 \x01(\t\x12\x0f\n\x07node_id\x18\x02 \x01(\t\x12\x13\n\x0bschedule_id\x18\x03 \x01(\x05\x12.\n\x0b\x65xecuted_by\x18\x04 \x01(\x0e\x32\x19.common.v1.Job.ExecutedBy\x12\x36\n\x12\x64\x65sired_start_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x35\n\x11\x61\x63tual_start_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0f\x61\x63tual_end_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12*\n\tjob_state\x18\x08 \x01(\x0e\x32\x17.common.v1.Job.JobState\x12\x13\n\x0bstatus_code\x18\t \x01(\x05\x12\x13\n\x0bresult_msgs\x18\n \x01(\t\x12/\n\x0b\x63reate_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"V\n\nExecutedBy\x12\x1b\n\x17\x45XECUTED_BY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x45XECUTED_BY_INBAND\x10\x01\x12\x13\n\x0f\x45XECUTED_BY_OOB\x10\x02\"Y\n\x08JobState\x12\x19\n\x15JOB_STATE_UNSPECIFIED\x10\x00\x12\r\n\tSCHEDULED\x10\x01\x12\x0b\n\x07STARTED\x10\x02\x12\n\n\x06PASSED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -51,4 +51,10 @@ _globals['_PREOPERATION']._serialized_end=1858 _globals['_POSTOPERATION']._serialized_start=1860 _globals['_POSTOPERATION']._serialized_end=1875 + _globals['_JOB']._serialized_start=1878 + _globals['_JOB']._serialized_end=2463 + _globals['_JOB_EXECUTEDBY']._serialized_start=2286 + _globals['_JOB_EXECUTEDBY']._serialized_end=2372 + _globals['_JOB_JOBSTATE']._serialized_start=2374 + _globals['_JOB_JOBSTATE']._serialized_end=2463 # @@protoc_insertion_point(module_scope) diff --git a/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi b/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi index 0a6f4247e..7a2e4a81e 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi +++ b/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi @@ -2,6 +2,7 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import google.protobuf.descriptor @@ -20,7 +21,7 @@ else: DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class Error(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -31,11 +32,11 @@ class Error(google.protobuf.message.Message): *, message: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["message", b"message"]) -> None: ... + def ClearField(self, field_name: typing.Literal["message", b"message"]) -> None: ... global___Error = Error -@typing_extensions.final +@typing.final class NodeScheduledOperations(google.protobuf.message.Message): """one node could have multiple operations (SOTA, FOTA, etc) each with their own schedules""" @@ -43,20 +44,20 @@ class NodeScheduledOperations(google.protobuf.message.Message): SCHEDULED_OPERATIONS_FIELD_NUMBER: builtins.int NODE_ID_FIELD_NUMBER: builtins.int + node_id: builtins.str @property def scheduled_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ScheduledOperation]: ... - node_id: builtins.str def __init__( self, *, scheduled_operations: collections.abc.Iterable[global___ScheduledOperation] | None = ..., node_id: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["node_id", b"node_id", "scheduled_operations", b"scheduled_operations"]) -> None: ... + def ClearField(self, field_name: typing.Literal["node_id", b"node_id", "scheduled_operations", b"scheduled_operations"]) -> None: ... global___NodeScheduledOperations = NodeScheduledOperations -@typing_extensions.final +@typing.final class ScheduledOperation(google.protobuf.message.Message): """this is one operation with a set of times to run""" @@ -74,12 +75,12 @@ class ScheduledOperation(google.protobuf.message.Message): operation: global___Operation | None = ..., schedules: collections.abc.Iterable[global___Schedule] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["operation", b"operation", "schedules", b"schedules"]) -> None: ... + def HasField(self, field_name: typing.Literal["operation", b"operation"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["operation", b"operation", "schedules", b"schedules"]) -> None: ... global___ScheduledOperation = ScheduledOperation -@typing_extensions.final +@typing.final class Schedule(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -95,13 +96,13 @@ class Schedule(google.protobuf.message.Message): single_schedule: global___SingleSchedule | None = ..., repeated_schedule: global___RepeatedSchedule | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["repeated_schedule", b"repeated_schedule", "schedule", b"schedule", "single_schedule", b"single_schedule"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["repeated_schedule", b"repeated_schedule", "schedule", b"schedule", "single_schedule", b"single_schedule"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["schedule", b"schedule"]) -> typing_extensions.Literal["single_schedule", "repeated_schedule"] | None: ... + def HasField(self, field_name: typing.Literal["repeated_schedule", b"repeated_schedule", "schedule", b"schedule", "single_schedule", b"single_schedule"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["repeated_schedule", b"repeated_schedule", "schedule", b"schedule", "single_schedule", b"single_schedule"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["schedule", b"schedule"]) -> typing.Literal["single_schedule", "repeated_schedule"] | None: ... global___Schedule = Schedule -@typing_extensions.final +@typing.final class SingleSchedule(google.protobuf.message.Message): """this is different from MM's SingleSchedule in that it is using google's Timestamp""" @@ -111,9 +112,11 @@ class SingleSchedule(google.protobuf.message.Message): START_TIME_FIELD_NUMBER: builtins.int END_TIME_FIELD_NUMBER: builtins.int job_id: builtins.str + """This will be created by MJunct. This will be empty coming into MJunct NB API. Else, it should have a string value.""" @property def start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: """to specify running immeidate, omit start time and end time""" + @property def end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... def __init__( @@ -123,12 +126,12 @@ class SingleSchedule(google.protobuf.message.Message): start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., end_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["end_time", b"end_time", "start_time", b"start_time"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["end_time", b"end_time", "job_id", b"job_id", "start_time", b"start_time"]) -> None: ... + def HasField(self, field_name: typing.Literal["end_time", b"end_time", "start_time", b"start_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["end_time", b"end_time", "job_id", b"job_id", "start_time", b"start_time"]) -> None: ... global___SingleSchedule = SingleSchedule -@typing_extensions.final +@typing.final class RepeatedSchedule(google.protobuf.message.Message): """this is different from MM's SingleSchedule in that it is using google's Duration""" @@ -142,9 +145,7 @@ class RepeatedSchedule(google.protobuf.message.Message): CRON_MONTH_FIELD_NUMBER: builtins.int CRON_DAY_WEEK_FIELD_NUMBER: builtins.int job_id: builtins.str - @property - def duration(self) -> google.protobuf.duration_pb2.Duration: - """should be between 1 second and 86400 seconds (24 hours worth of seconds)""" + """This will be created by MJunct. This will be empty coming into MJunct NB API. Else, it should have a string value.""" cron_minutes: builtins.str """cron style minutes (0-59)""" cron_hours: builtins.str @@ -155,6 +156,10 @@ class RepeatedSchedule(google.protobuf.message.Message): """cron style month (1-12)""" cron_day_week: builtins.str """cron style day of week (0-6)""" + @property + def duration(self) -> google.protobuf.duration_pb2.Duration: + """should be between 1 second and 86400 seconds (24 hours worth of seconds)""" + def __init__( self, *, @@ -166,12 +171,12 @@ class RepeatedSchedule(google.protobuf.message.Message): cron_month: builtins.str = ..., cron_day_week: builtins.str = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["duration", b"duration"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["cron_day_month", b"cron_day_month", "cron_day_week", b"cron_day_week", "cron_hours", b"cron_hours", "cron_minutes", b"cron_minutes", "cron_month", b"cron_month", "duration", b"duration", "job_id", b"job_id"]) -> None: ... + def HasField(self, field_name: typing.Literal["duration", b"duration"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["cron_day_month", b"cron_day_month", "cron_day_week", b"cron_day_week", "cron_hours", b"cron_hours", "cron_minutes", b"cron_minutes", "cron_month", b"cron_month", "duration", b"duration", "job_id", b"job_id"]) -> None: ... global___RepeatedSchedule = RepeatedSchedule -@typing_extensions.final +@typing.final class Operation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -199,16 +204,17 @@ class Operation(google.protobuf.message.Message): SERVICE_TYPE_FIELD_NUMBER: builtins.int UPDATE_SYSTEM_SOFTWARE_OPERATION_FIELD_NUMBER: builtins.int SET_POWER_STATE_OPERATION_FIELD_NUMBER: builtins.int + service_type: global___Operation.ServiceType.ValueType @property def pre_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PreOperation]: ... @property def post_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PostOperation]: ... - service_type: global___Operation.ServiceType.ValueType @property def update_system_software_operation(self) -> global___UpdateSystemSoftwareOperation: ... @property def set_power_state_operation(self) -> global___SetPowerStateOperation: """and others""" + def __init__( self, *, @@ -218,13 +224,13 @@ class Operation(google.protobuf.message.Message): update_system_software_operation: global___UpdateSystemSoftwareOperation | None = ..., set_power_state_operation: global___SetPowerStateOperation | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["operation", b"operation", "set_power_state_operation", b"set_power_state_operation", "update_system_software_operation", b"update_system_software_operation"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["operation", b"operation", "post_operations", b"post_operations", "pre_operations", b"pre_operations", "service_type", b"service_type", "set_power_state_operation", b"set_power_state_operation", "update_system_software_operation", b"update_system_software_operation"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["operation", b"operation"]) -> typing_extensions.Literal["update_system_software_operation", "set_power_state_operation"] | None: ... + def HasField(self, field_name: typing.Literal["operation", b"operation", "set_power_state_operation", b"set_power_state_operation", "update_system_software_operation", b"update_system_software_operation"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["operation", b"operation", "post_operations", b"post_operations", "pre_operations", b"pre_operations", "service_type", b"service_type", "set_power_state_operation", b"set_power_state_operation", "update_system_software_operation", b"update_system_software_operation"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["operation", b"operation"]) -> typing.Literal["update_system_software_operation", "set_power_state_operation"] | None: ... global___Operation = Operation -@typing_extensions.final +@typing.final class UpdateSystemSoftwareOperation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -258,16 +264,18 @@ class UpdateSystemSoftwareOperation(google.protobuf.message.Message): PACKAGE_LIST_FIELD_NUMBER: builtins.int url: builtins.str """URL from which to remotely retrieve the package""" - @property - def release_date(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Release date of the new SW update.""" mode: global___UpdateSystemSoftwareOperation.DownloadMode.ValueType """Mode for installing the softare update regarding download and install steps.""" do_not_reboot: builtins.bool """Whether to reboot the node after the firmware update attempt""" + @property + def release_date(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Release date of the new SW update.""" + @property def package_list(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """List of packages to install if whole package update isn't desired.""" + def __init__( self, *, @@ -277,12 +285,12 @@ class UpdateSystemSoftwareOperation(google.protobuf.message.Message): do_not_reboot: builtins.bool = ..., package_list: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["release_date", b"release_date"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["do_not_reboot", b"do_not_reboot", "mode", b"mode", "package_list", b"package_list", "release_date", b"release_date", "url", b"url"]) -> None: ... + def HasField(self, field_name: typing.Literal["release_date", b"release_date"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["do_not_reboot", b"do_not_reboot", "mode", b"mode", "package_list", b"package_list", "release_date", b"release_date", "url", b"url"]) -> None: ... global___UpdateSystemSoftwareOperation = UpdateSystemSoftwareOperation -@typing_extensions.final +@typing.final class SetPowerStateOperation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -312,11 +320,11 @@ class SetPowerStateOperation(google.protobuf.message.Message): *, opcode: global___SetPowerStateOperation.PowerState.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["opcode", b"opcode"]) -> None: ... + def ClearField(self, field_name: typing.Literal["opcode", b"opcode"]) -> None: ... global___SetPowerStateOperation = SetPowerStateOperation -@typing_extensions.final +@typing.final class PreOperation(google.protobuf.message.Message): """ oneof pre_operation { // ... @@ -331,7 +339,7 @@ class PreOperation(google.protobuf.message.Message): global___PreOperation = PreOperation -@typing_extensions.final +@typing.final class PostOperation(google.protobuf.message.Message): """ oneof post_operation { // ... @@ -345,3 +353,97 @@ class PostOperation(google.protobuf.message.Message): ) -> None: ... global___PostOperation = PostOperation + +@typing.final +class Job(google.protobuf.message.Message): + """this message represents a Job and can be used in multiple contexts; see RPC definitions + for some definitions fields may be ignored; e.g., when reporting job status up from a node, + the node_id is ignored and is filled in by INBS + """ + + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + class _ExecutedBy: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _ExecutedByEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Job._ExecutedBy.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + EXECUTED_BY_UNSPECIFIED: Job._ExecutedBy.ValueType # 0 + EXECUTED_BY_INBAND: Job._ExecutedBy.ValueType # 1 + EXECUTED_BY_OOB: Job._ExecutedBy.ValueType # 2 + + class ExecutedBy(_ExecutedBy, metaclass=_ExecutedByEnumTypeWrapper): ... + EXECUTED_BY_UNSPECIFIED: Job.ExecutedBy.ValueType # 0 + EXECUTED_BY_INBAND: Job.ExecutedBy.ValueType # 1 + EXECUTED_BY_OOB: Job.ExecutedBy.ValueType # 2 + + class _JobState: + ValueType = typing.NewType("ValueType", builtins.int) + V: typing_extensions.TypeAlias = ValueType + + class _JobStateEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Job._JobState.ValueType], builtins.type): + DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor + JOB_STATE_UNSPECIFIED: Job._JobState.ValueType # 0 + SCHEDULED: Job._JobState.ValueType # 1 + STARTED: Job._JobState.ValueType # 2 + PASSED: Job._JobState.ValueType # 3 + FAILED: Job._JobState.ValueType # 4 + + class JobState(_JobState, metaclass=_JobStateEnumTypeWrapper): ... + JOB_STATE_UNSPECIFIED: Job.JobState.ValueType # 0 + SCHEDULED: Job.JobState.ValueType # 1 + STARTED: Job.JobState.ValueType # 2 + PASSED: Job.JobState.ValueType # 3 + FAILED: Job.JobState.ValueType # 4 + + JOB_ID_FIELD_NUMBER: builtins.int + NODE_ID_FIELD_NUMBER: builtins.int + SCHEDULE_ID_FIELD_NUMBER: builtins.int + EXECUTED_BY_FIELD_NUMBER: builtins.int + DESIRED_START_TIME_FIELD_NUMBER: builtins.int + ACTUAL_START_TIME_FIELD_NUMBER: builtins.int + ACTUAL_END_TIME_FIELD_NUMBER: builtins.int + JOB_STATE_FIELD_NUMBER: builtins.int + STATUS_CODE_FIELD_NUMBER: builtins.int + RESULT_MSGS_FIELD_NUMBER: builtins.int + CREATE_TIME_FIELD_NUMBER: builtins.int + job_id: builtins.str + """UUID with abbreviated type""" + node_id: builtins.str + """UUID, references NODE(node_id)""" + schedule_id: builtins.int + """References SCHEDULE(schedule_id)""" + executed_by: global___Job.ExecutedBy.ValueType + job_state: global___Job.JobState.ValueType + status_code: builtins.int + """Not yet defined""" + result_msgs: builtins.str + """JSON string for result messages of all tasks ran""" + @property + def desired_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def actual_start_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def actual_end_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + @property + def create_time(self) -> google.protobuf.timestamp_pb2.Timestamp: ... + def __init__( + self, + *, + job_id: builtins.str = ..., + node_id: builtins.str = ..., + schedule_id: builtins.int = ..., + executed_by: global___Job.ExecutedBy.ValueType = ..., + desired_start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + actual_start_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + actual_end_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + job_state: global___Job.JobState.ValueType = ..., + status_code: builtins.int = ..., + result_msgs: builtins.str = ..., + create_time: google.protobuf.timestamp_pb2.Timestamp | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["actual_end_time", b"actual_end_time", "actual_start_time", b"actual_start_time", "create_time", b"create_time", "desired_start_time", b"desired_start_time"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["actual_end_time", b"actual_end_time", "actual_start_time", b"actual_start_time", "create_time", b"create_time", "desired_start_time", b"desired_start_time", "executed_by", b"executed_by", "job_id", b"job_id", "job_state", b"job_state", "node_id", b"node_id", "result_msgs", b"result_msgs", "schedule_id", b"schedule_id", "status_code", b"status_code"]) -> None: ... + +global___Job = Job diff --git a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.py b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.py index ef2f67da0..f736a6135 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.py +++ b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.py @@ -15,7 +15,7 @@ from cloudadapter.pb.common.v1 import common_pb2 as common_dot_v1_dot_common__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15inbs/v1/inbs_sb.proto\x12\x07inbs.v1\x1a\x16\x63ommon/v1/common.proto\"U\n\x18HandleINBMCommandRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12%\n\x07\x63ommand\x18\x02 \x01(\x0b\x32\x14.inbs.v1.INBMCommand\"P\n\x19HandleINBMCommandResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.common.v1.Error\"\x87\x01\n\x0bINBMCommand\x12I\n\x1bupdate_scheduled_operations\x18\x01 \x01(\x0b\x32\".inbs.v1.UpdateScheduledOperationsH\x00\x12\x1d\n\x04ping\x18\x02 \x01(\x0b\x32\r.inbs.v1.PingH\x00\x42\x0e\n\x0cinbm_command\"X\n\x19UpdateScheduledOperations\x12;\n\x14scheduled_operations\x18\x01 \x03(\x0b\x32\x1d.common.v1.ScheduledOperation\"\x06\n\x04Ping2o\n\rINBSSBService\x12^\n\x11HandleINBMCommand\x12\".inbs.v1.HandleINBMCommandResponse\x1a!.inbs.v1.HandleINBMCommandRequest(\x01\x30\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15inbs/v1/inbs_sb.proto\x12\x07inbs.v1\x1a\x16\x63ommon/v1/common.proto\"U\n\x18HandleINBMCommandRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12%\n\x07\x63ommand\x18\x02 \x01(\x0b\x32\x14.inbs.v1.INBMCommand\"P\n\x19HandleINBMCommandResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.common.v1.Error\"\x87\x01\n\x0bINBMCommand\x12I\n\x1bupdate_scheduled_operations\x18\x01 \x01(\x0b\x32\".inbs.v1.UpdateScheduledOperationsH\x00\x12\x1d\n\x04ping\x18\x02 \x01(\x0b\x32\r.inbs.v1.PingH\x00\x42\x0e\n\x0cinbm_command\"X\n\x19UpdateScheduledOperations\x12;\n\x14scheduled_operations\x18\x01 \x03(\x0b\x32\x1d.common.v1.ScheduledOperation\"\x06\n\x04Ping\"[\n\x15SendNodeUpdateRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12$\n\njob_update\x18\x03 \x01(\x0b\x32\x0e.common.v1.JobH\x00\x42\x08\n\x06update\"M\n\x16SendNodeUpdateResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.common.v1.Error2\xc2\x01\n\rINBSSBService\x12^\n\x11HandleINBMCommand\x12\".inbs.v1.HandleINBMCommandResponse\x1a!.inbs.v1.HandleINBMCommandRequest(\x01\x30\x01\x12Q\n\x0eSendNodeUpdate\x12\x1e.inbs.v1.SendNodeUpdateRequest\x1a\x1f.inbs.v1.SendNodeUpdateResponseb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -32,6 +32,10 @@ _globals['_UPDATESCHEDULEDOPERATIONS']._serialized_end=453 _globals['_PING']._serialized_start=455 _globals['_PING']._serialized_end=461 - _globals['_INBSSBSERVICE']._serialized_start=463 - _globals['_INBSSBSERVICE']._serialized_end=574 + _globals['_SENDNODEUPDATEREQUEST']._serialized_start=463 + _globals['_SENDNODEUPDATEREQUEST']._serialized_end=554 + _globals['_SENDNODEUPDATERESPONSE']._serialized_start=556 + _globals['_SENDNODEUPDATERESPONSE']._serialized_end=633 + _globals['_INBSSBSERVICE']._serialized_start=636 + _globals['_INBSSBSERVICE']._serialized_end=830 # @@protoc_insertion_point(module_scope) diff --git a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.pyi b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.pyi index 2b417e46e..f33dd22a3 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.pyi +++ b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2.pyi @@ -2,22 +2,18 @@ @generated by mypy-protobuf. Do not edit manually! isort:skip_file """ + import builtins import collections.abc import cloudadapter.pb.common.v1.common_pb2 import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class HandleINBMCommandRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -32,12 +28,12 @@ class HandleINBMCommandRequest(google.protobuf.message.Message): request_id: builtins.str = ..., command: global___INBMCommand | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["command", b"command"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["command", b"command", "request_id", b"request_id"]) -> None: ... + def HasField(self, field_name: typing.Literal["command", b"command"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["command", b"command", "request_id", b"request_id"]) -> None: ... global___HandleINBMCommandRequest = HandleINBMCommandRequest -@typing_extensions.final +@typing.final class HandleINBMCommandResponse(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -52,12 +48,12 @@ class HandleINBMCommandResponse(google.protobuf.message.Message): request_id: builtins.str = ..., error: cloudadapter.pb.common.v1.common_pb2.Error | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["error", b"error"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["error", b"error", "request_id", b"request_id"]) -> None: ... + def HasField(self, field_name: typing.Literal["error", b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["error", b"error", "request_id", b"request_id"]) -> None: ... global___HandleINBMCommandResponse = HandleINBMCommandResponse -@typing_extensions.final +@typing.final class INBMCommand(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -73,13 +69,13 @@ class INBMCommand(google.protobuf.message.Message): update_scheduled_operations: global___UpdateScheduledOperations | None = ..., ping: global___Ping | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["inbm_command", b"inbm_command", "ping", b"ping", "update_scheduled_operations", b"update_scheduled_operations"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["inbm_command", b"inbm_command", "ping", b"ping", "update_scheduled_operations", b"update_scheduled_operations"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["inbm_command", b"inbm_command"]) -> typing_extensions.Literal["update_scheduled_operations", "ping"] | None: ... + def HasField(self, field_name: typing.Literal["inbm_command", b"inbm_command", "ping", b"ping", "update_scheduled_operations", b"update_scheduled_operations"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["inbm_command", b"inbm_command", "ping", b"ping", "update_scheduled_operations", b"update_scheduled_operations"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["inbm_command", b"inbm_command"]) -> typing.Literal["update_scheduled_operations", "ping"] | None: ... global___INBMCommand = INBMCommand -@typing_extensions.final +@typing.final class UpdateScheduledOperations(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -91,11 +87,11 @@ class UpdateScheduledOperations(google.protobuf.message.Message): *, scheduled_operations: collections.abc.Iterable[cloudadapter.pb.common.v1.common_pb2.ScheduledOperation] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["scheduled_operations", b"scheduled_operations"]) -> None: ... + def ClearField(self, field_name: typing.Literal["scheduled_operations", b"scheduled_operations"]) -> None: ... global___UpdateScheduledOperations = UpdateScheduledOperations -@typing_extensions.final +@typing.final class Ping(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -104,3 +100,46 @@ class Ping(google.protobuf.message.Message): ) -> None: ... global___Ping = Ping + +@typing.final +class SendNodeUpdateRequest(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REQUEST_ID_FIELD_NUMBER: builtins.int + JOB_UPDATE_FIELD_NUMBER: builtins.int + request_id: builtins.str + @property + def job_update(self) -> cloudadapter.pb.common.v1.common_pb2.Job: + """node_id will be filled in by INBS; schedule_id, executed_by, desired_start_time, create_time will be ignored""" + + def __init__( + self, + *, + request_id: builtins.str = ..., + job_update: cloudadapter.pb.common.v1.common_pb2.Job | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["job_update", b"job_update", "update", b"update"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["job_update", b"job_update", "request_id", b"request_id", "update", b"update"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["update", b"update"]) -> typing.Literal["job_update"] | None: ... + +global___SendNodeUpdateRequest = SendNodeUpdateRequest + +@typing.final +class SendNodeUpdateResponse(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + REQUEST_ID_FIELD_NUMBER: builtins.int + ERROR_FIELD_NUMBER: builtins.int + request_id: builtins.str + @property + def error(self) -> cloudadapter.pb.common.v1.common_pb2.Error: ... + def __init__( + self, + *, + request_id: builtins.str = ..., + error: cloudadapter.pb.common.v1.common_pb2.Error | None = ..., + ) -> None: ... + def HasField(self, field_name: typing.Literal["error", b"error"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["error", b"error", "request_id", b"request_id"]) -> None: ... + +global___SendNodeUpdateResponse = SendNodeUpdateResponse diff --git a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2_grpc.py b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2_grpc.py index 941606eb5..5274d1bc2 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2_grpc.py +++ b/inbm/cloudadapter-agent/cloudadapter/pb/inbs/v1/inbs_sb_pb2_grpc.py @@ -19,6 +19,11 @@ def __init__(self, channel): request_serializer=inbs_dot_v1_dot_inbs__sb__pb2.HandleINBMCommandResponse.SerializeToString, response_deserializer=inbs_dot_v1_dot_inbs__sb__pb2.HandleINBMCommandRequest.FromString, ) + self.SendNodeUpdate = channel.unary_unary( + '/inbs.v1.INBSSBService/SendNodeUpdate', + request_serializer=inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateRequest.SerializeToString, + response_deserializer=inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateResponse.FromString, + ) class INBSSBServiceServicer(object): @@ -31,6 +36,13 @@ def HandleINBMCommand(self, request_iterator, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def SendNodeUpdate(self, request, context): + """Used to send any kind of node status update + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def add_INBSSBServiceServicer_to_server(servicer, server): rpc_method_handlers = { @@ -39,6 +51,11 @@ def add_INBSSBServiceServicer_to_server(servicer, server): request_deserializer=inbs_dot_v1_dot_inbs__sb__pb2.HandleINBMCommandResponse.FromString, response_serializer=inbs_dot_v1_dot_inbs__sb__pb2.HandleINBMCommandRequest.SerializeToString, ), + 'SendNodeUpdate': grpc.unary_unary_rpc_method_handler( + servicer.SendNodeUpdate, + request_deserializer=inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateRequest.FromString, + response_serializer=inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'inbs.v1.INBSSBService', rpc_method_handlers) @@ -65,3 +82,20 @@ def HandleINBMCommand(request_iterator, inbs_dot_v1_dot_inbs__sb__pb2.HandleINBMCommandRequest.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SendNodeUpdate(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/inbs.v1.INBSSBService/SendNodeUpdate', + inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateRequest.SerializeToString, + inbs_dot_v1_dot_inbs__sb__pb2.SendNodeUpdateResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/inbm/proto/common/v1/common.proto b/inbm/proto/common/v1/common.proto index 70c7ca714..e32b720d1 100644 --- a/inbm/proto/common/v1/common.proto +++ b/inbm/proto/common/v1/common.proto @@ -103,3 +103,37 @@ message PostOperation { // // ... // } } + + +// this message represents a Job and can be used in multiple contexts; see RPC definitions +// for some definitions fields may be ignored; e.g., when reporting job status up from a node, +// the node_id is ignored and is filled in by INBS +message Job { + string job_id = 1; // UUID with abbreviated type + string node_id = 2; // UUID, references NODE(node_id) + int32 schedule_id = 3; // References SCHEDULE(schedule_id) + + enum ExecutedBy { + EXECUTED_BY_UNSPECIFIED = 0; + EXECUTED_BY_INBAND = 1; + EXECUTED_BY_OOB = 2; + } + ExecutedBy executed_by = 4; + + google.protobuf.Timestamp desired_start_time = 5; + google.protobuf.Timestamp actual_start_time = 6; + google.protobuf.Timestamp actual_end_time = 7; + + enum JobState { + JOB_STATE_UNSPECIFIED = 0; + SCHEDULED = 1; + STARTED = 2; + PASSED = 3; + FAILED = 4; + } + JobState job_state = 8; + + int32 status_code = 9; // Not yet defined + string result_msgs = 10; // JSON string for result messages of all tasks ran + google.protobuf.Timestamp create_time = 11; +} \ No newline at end of file diff --git a/inbm/proto/inbs-mock/pb/common.pb.go b/inbm/proto/inbs-mock/pb/common.pb.go index 603b0e863..b42fa1336 100644 --- a/inbm/proto/inbs-mock/pb/common.pb.go +++ b/inbm/proto/inbs-mock/pb/common.pb.go @@ -184,6 +184,110 @@ func (SetPowerStateOperation_PowerState) EnumDescriptor() ([]byte, []int) { return file_common_v1_common_proto_rawDescGZIP(), []int{8, 0} } +type Job_ExecutedBy int32 + +const ( + Job_EXECUTED_BY_UNSPECIFIED Job_ExecutedBy = 0 + Job_EXECUTED_BY_INBAND Job_ExecutedBy = 1 + Job_EXECUTED_BY_OOB Job_ExecutedBy = 2 +) + +// Enum value maps for Job_ExecutedBy. +var ( + Job_ExecutedBy_name = map[int32]string{ + 0: "EXECUTED_BY_UNSPECIFIED", + 1: "EXECUTED_BY_INBAND", + 2: "EXECUTED_BY_OOB", + } + Job_ExecutedBy_value = map[string]int32{ + "EXECUTED_BY_UNSPECIFIED": 0, + "EXECUTED_BY_INBAND": 1, + "EXECUTED_BY_OOB": 2, + } +) + +func (x Job_ExecutedBy) Enum() *Job_ExecutedBy { + p := new(Job_ExecutedBy) + *p = x + return p +} + +func (x Job_ExecutedBy) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Job_ExecutedBy) Descriptor() protoreflect.EnumDescriptor { + return file_common_v1_common_proto_enumTypes[3].Descriptor() +} + +func (Job_ExecutedBy) Type() protoreflect.EnumType { + return &file_common_v1_common_proto_enumTypes[3] +} + +func (x Job_ExecutedBy) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Job_ExecutedBy.Descriptor instead. +func (Job_ExecutedBy) EnumDescriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{11, 0} +} + +type Job_JobState int32 + +const ( + Job_JOB_STATE_UNSPECIFIED Job_JobState = 0 + Job_SCHEDULED Job_JobState = 1 + Job_STARTED Job_JobState = 2 + Job_PASSED Job_JobState = 3 + Job_FAILED Job_JobState = 4 +) + +// Enum value maps for Job_JobState. +var ( + Job_JobState_name = map[int32]string{ + 0: "JOB_STATE_UNSPECIFIED", + 1: "SCHEDULED", + 2: "STARTED", + 3: "PASSED", + 4: "FAILED", + } + Job_JobState_value = map[string]int32{ + "JOB_STATE_UNSPECIFIED": 0, + "SCHEDULED": 1, + "STARTED": 2, + "PASSED": 3, + "FAILED": 4, + } +) + +func (x Job_JobState) Enum() *Job_JobState { + p := new(Job_JobState) + *p = x + return p +} + +func (x Job_JobState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Job_JobState) Descriptor() protoreflect.EnumDescriptor { + return file_common_v1_common_proto_enumTypes[4].Descriptor() +} + +func (Job_JobState) Type() protoreflect.EnumType { + return &file_common_v1_common_proto_enumTypes[4] +} + +func (x Job_JobState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Job_JobState.Descriptor instead. +func (Job_JobState) EnumDescriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{11, 1} +} + type Error struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -430,9 +534,11 @@ type SingleSchedule struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // This will be created by MJunct. This will be empty coming into MJunct NB API. Else, it should have a string value. + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // to specify running immeidate, omit start time and end time - StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` + StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` } func (x *SingleSchedule) Reset() { @@ -467,6 +573,13 @@ func (*SingleSchedule) Descriptor() ([]byte, []int) { return file_common_v1_common_proto_rawDescGZIP(), []int{4} } +func (x *SingleSchedule) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + func (x *SingleSchedule) GetStartTime() *timestamp.Timestamp { if x != nil { return x.StartTime @@ -487,12 +600,14 @@ type RepeatedSchedule struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Duration *duration.Duration `protobuf:"bytes,1,opt,name=duration,proto3" json:"duration,omitempty"` // should be between 1 second and 86400 seconds (24 hours worth of seconds) - CronMinutes string `protobuf:"bytes,2,opt,name=cron_minutes,json=cronMinutes,proto3" json:"cron_minutes,omitempty"` // cron style minutes (0-59) - CronHours string `protobuf:"bytes,3,opt,name=cron_hours,json=cronHours,proto3" json:"cron_hours,omitempty"` // cron style hours (0-23) - CronDayMonth string `protobuf:"bytes,4,opt,name=cron_day_month,json=cronDayMonth,proto3" json:"cron_day_month,omitempty"` // cron style day of month (0-31) - CronMonth string `protobuf:"bytes,5,opt,name=cron_month,json=cronMonth,proto3" json:"cron_month,omitempty"` // cron style month (1-12) - CronDayWeek string `protobuf:"bytes,6,opt,name=cron_day_week,json=cronDayWeek,proto3" json:"cron_day_week,omitempty"` // cron style day of week (0-6) + // This will be created by MJunct. This will be empty coming into MJunct NB API. Else, it should have a string value. + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` + Duration *duration.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` // should be between 1 second and 86400 seconds (24 hours worth of seconds) + CronMinutes string `protobuf:"bytes,3,opt,name=cron_minutes,json=cronMinutes,proto3" json:"cron_minutes,omitempty"` // cron style minutes (0-59) + CronHours string `protobuf:"bytes,4,opt,name=cron_hours,json=cronHours,proto3" json:"cron_hours,omitempty"` // cron style hours (0-23) + CronDayMonth string `protobuf:"bytes,5,opt,name=cron_day_month,json=cronDayMonth,proto3" json:"cron_day_month,omitempty"` // cron style day of month (0-31) + CronMonth string `protobuf:"bytes,6,opt,name=cron_month,json=cronMonth,proto3" json:"cron_month,omitempty"` // cron style month (1-12) + CronDayWeek string `protobuf:"bytes,7,opt,name=cron_day_week,json=cronDayWeek,proto3" json:"cron_day_week,omitempty"` // cron style day of week (0-6) } func (x *RepeatedSchedule) Reset() { @@ -527,6 +642,13 @@ func (*RepeatedSchedule) Descriptor() ([]byte, []int) { return file_common_v1_common_proto_rawDescGZIP(), []int{5} } +func (x *RepeatedSchedule) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + func (x *RepeatedSchedule) GetDuration() *duration.Duration { if x != nil { return x.Duration @@ -876,6 +998,136 @@ func (*PostOperation) Descriptor() ([]byte, []int) { return file_common_v1_common_proto_rawDescGZIP(), []int{10} } +// this message represents a Job and can be used in multiple contexts; see RPC definitions +// for some definitions fields may be ignored; e.g., when reporting job status up from a node, +// the node_id is ignored and is filled in by INBS +type Job struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobId string `protobuf:"bytes,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // UUID with abbreviated type + NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // UUID, references NODE(node_id) + ScheduleId int32 `protobuf:"varint,3,opt,name=schedule_id,json=scheduleId,proto3" json:"schedule_id,omitempty"` // References SCHEDULE(schedule_id) + ExecutedBy Job_ExecutedBy `protobuf:"varint,4,opt,name=executed_by,json=executedBy,proto3,enum=common.v1.Job_ExecutedBy" json:"executed_by,omitempty"` + DesiredStartTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=desired_start_time,json=desiredStartTime,proto3" json:"desired_start_time,omitempty"` + ActualStartTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=actual_start_time,json=actualStartTime,proto3" json:"actual_start_time,omitempty"` + ActualEndTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=actual_end_time,json=actualEndTime,proto3" json:"actual_end_time,omitempty"` + JobState Job_JobState `protobuf:"varint,8,opt,name=job_state,json=jobState,proto3,enum=common.v1.Job_JobState" json:"job_state,omitempty"` + StatusCode int32 `protobuf:"varint,9,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // Not yet defined + ResultMsgs string `protobuf:"bytes,10,opt,name=result_msgs,json=resultMsgs,proto3" json:"result_msgs,omitempty"` // JSON string for result messages of all tasks ran + CreateTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` +} + +func (x *Job) Reset() { + *x = Job{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Job) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Job) ProtoMessage() {} + +func (x *Job) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Job.ProtoReflect.Descriptor instead. +func (*Job) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{11} +} + +func (x *Job) GetJobId() string { + if x != nil { + return x.JobId + } + return "" +} + +func (x *Job) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *Job) GetScheduleId() int32 { + if x != nil { + return x.ScheduleId + } + return 0 +} + +func (x *Job) GetExecutedBy() Job_ExecutedBy { + if x != nil { + return x.ExecutedBy + } + return Job_EXECUTED_BY_UNSPECIFIED +} + +func (x *Job) GetDesiredStartTime() *timestamp.Timestamp { + if x != nil { + return x.DesiredStartTime + } + return nil +} + +func (x *Job) GetActualStartTime() *timestamp.Timestamp { + if x != nil { + return x.ActualStartTime + } + return nil +} + +func (x *Job) GetActualEndTime() *timestamp.Timestamp { + if x != nil { + return x.ActualEndTime + } + return nil +} + +func (x *Job) GetJobState() Job_JobState { + if x != nil { + return x.JobState + } + return Job_JOB_STATE_UNSPECIFIED +} + +func (x *Job) GetStatusCode() int32 { + if x != nil { + return x.StatusCode + } + return 0 +} + +func (x *Job) GetResultMsgs() string { + if x != nil { + return x.ResultMsgs + } + return "" +} + +func (x *Job) GetCreateTime() *timestamp.Timestamp { + if x != nil { + return x.CreateTime + } + return nil +} + var File_common_v1_common_proto protoreflect.FileDescriptor var file_common_v1_common_proto_rawDesc = []byte{ @@ -914,109 +1166,157 @@ var file_common_v1_common_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x63, - 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x82, 0x01, 0x0a, 0x0e, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, - 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x0e, 0x53, 0x69, 0x6e, 0x67, 0x6c, + 0x65, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, + 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, + 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xf4, 0x01, 0x0a, 0x10, - 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, - 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x5f, - 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x72, 0x6f, 0x6e, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, - 0x6f, 0x6e, 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x63, 0x72, 0x6f, 0x6e, 0x48, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x72, 0x6f, - 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, - 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x22, - 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x72, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x57, 0x65, - 0x65, 0x6b, 0x22, 0xc5, 0x04, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x3e, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x41, 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x73, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, - 0x61, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1d, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, - 0x77, 0x61, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, - 0x19, 0x73, 0x65, 0x74, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, + 0x6d, 0x65, 0x22, 0x8b, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x53, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x35, + 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x6d, 0x69, + 0x6e, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x72, 0x6f, + 0x6e, 0x4d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x6f, 0x6e, + 0x5f, 0x68, 0x6f, 0x75, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, + 0x6f, 0x6e, 0x48, 0x6f, 0x75, 0x72, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x63, 0x72, 0x6f, 0x6e, 0x5f, + 0x64, 0x61, 0x79, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, + 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x79, 0x5f, 0x77, 0x65, 0x65, 0x6b, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x72, 0x6f, 0x6e, 0x44, 0x61, 0x79, 0x57, 0x65, 0x65, 0x6b, + 0x22, 0xc5, 0x04, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, + 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0d, 0x70, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, + 0x0a, 0x0f, 0x70, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x43, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x73, 0x0a, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, + 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, + 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x1d, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, + 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x19, 0x73, + 0x65, 0x74, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, + 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x00, 0x52, 0x16, 0x73, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x0b, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x53, + 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x52, + 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x53, 0x10, 0x01, + 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x4f, 0x42, 0x5f, 0x41, 0x4d, 0x54, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, + 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4f, 0x42, 0x5f, 0x42, + 0x4d, 0x43, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x04, 0x42, 0x0b, 0x0a, 0x09, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x03, 0x0a, 0x1d, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, + 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x3d, 0x0a, 0x0c, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, + 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x6d, + 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, + 0x5f, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, + 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x85, 0x01, + 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1d, + 0x0a, 0x19, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, + 0x12, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x46, + 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, + 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, + 0x41, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, + 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x22, 0xe1, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x44, 0x0a, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x73, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8d, 0x01, - 0x0a, 0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, - 0x18, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, - 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x42, 0x53, - 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4f, 0x4f, 0x42, 0x5f, 0x41, 0x4d, 0x54, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, - 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4f, 0x42, - 0x5f, 0x42, 0x4d, 0x43, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, - 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x04, 0x42, 0x0b, 0x0a, - 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8a, 0x03, 0x0a, 0x1d, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, - 0x61, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, - 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x3d, - 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x06, + 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x59, 0x43, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x13, 0x0a, + 0x0f, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x46, 0x46, + 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x0a, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x72, 0x65, + 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x50, 0x6f, 0x73, + 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xd0, 0x05, 0x0a, 0x03, 0x4a, + 0x6f, 0x62, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, + 0x62, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, + 0x64, 0x42, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, + 0x48, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x64, 0x65, 0x73, 0x69, 0x72, 0x65, 0x64, + 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x61, 0x63, 0x74, + 0x75, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x44, 0x61, 0x74, 0x65, 0x12, 0x49, 0x0a, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x35, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, - 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x64, 0x6f, 0x5f, 0x6e, - 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x64, 0x6f, 0x4e, 0x6f, 0x74, 0x52, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, - 0x85, 0x01, 0x0a, 0x0c, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, - 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x4f, 0x57, 0x4e, 0x4c, - 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x5f, 0x44, 0x4f, 0x57, 0x4e, - 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, - 0x41, 0x44, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, - 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x22, 0xe1, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x50, - 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x06, 0x6f, 0x70, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x0a, 0x50, 0x6f, 0x77, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4f, 0x57, 0x45, 0x52, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4f, 0x57, 0x45, - 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x59, 0x43, 0x4c, 0x45, 0x10, 0x05, 0x12, - 0x13, 0x0a, 0x0f, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4f, - 0x46, 0x46, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x53, 0x54, - 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x0a, 0x22, 0x0e, 0x0a, 0x0c, 0x50, - 0x72, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x0f, 0x0a, 0x0d, 0x50, - 0x6f, 0x73, 0x74, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x0f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x42, 0x0a, 0x0f, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x64, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x45, 0x6e, + 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x2e, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x6d, 0x73, 0x67, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x4d, 0x73, 0x67, 0x73, 0x12, 0x3b, 0x0a, + 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x56, 0x0a, 0x0a, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x42, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x45, 0x58, 0x45, 0x43, + 0x55, 0x54, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, + 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x49, 0x4e, 0x42, 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, + 0x0f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x42, 0x59, 0x5f, 0x4f, 0x4f, 0x42, + 0x10, 0x02, 0x22, 0x59, 0x0a, 0x08, 0x4a, 0x6f, 0x62, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, + 0x0a, 0x15, 0x4a, 0x4f, 0x42, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x43, 0x48, + 0x45, 0x44, 0x55, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x54, 0x41, 0x52, + 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1031,48 +1331,57 @@ func file_common_v1_common_proto_rawDescGZIP() []byte { return file_common_v1_common_proto_rawDescData } -var file_common_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_common_v1_common_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_common_v1_common_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_common_v1_common_proto_goTypes = []interface{}{ (Operation_ServiceType)(0), // 0: common.v1.Operation.ServiceType (UpdateSystemSoftwareOperation_DownloadMode)(0), // 1: common.v1.UpdateSystemSoftwareOperation.DownloadMode (SetPowerStateOperation_PowerState)(0), // 2: common.v1.SetPowerStateOperation.PowerState - (*Error)(nil), // 3: common.v1.Error - (*NodeScheduledOperations)(nil), // 4: common.v1.NodeScheduledOperations - (*ScheduledOperation)(nil), // 5: common.v1.ScheduledOperation - (*Schedule)(nil), // 6: common.v1.Schedule - (*SingleSchedule)(nil), // 7: common.v1.SingleSchedule - (*RepeatedSchedule)(nil), // 8: common.v1.RepeatedSchedule - (*Operation)(nil), // 9: common.v1.Operation - (*UpdateSystemSoftwareOperation)(nil), // 10: common.v1.UpdateSystemSoftwareOperation - (*SetPowerStateOperation)(nil), // 11: common.v1.SetPowerStateOperation - (*PreOperation)(nil), // 12: common.v1.PreOperation - (*PostOperation)(nil), // 13: common.v1.PostOperation - (*timestamp.Timestamp)(nil), // 14: google.protobuf.Timestamp - (*duration.Duration)(nil), // 15: google.protobuf.Duration + (Job_ExecutedBy)(0), // 3: common.v1.Job.ExecutedBy + (Job_JobState)(0), // 4: common.v1.Job.JobState + (*Error)(nil), // 5: common.v1.Error + (*NodeScheduledOperations)(nil), // 6: common.v1.NodeScheduledOperations + (*ScheduledOperation)(nil), // 7: common.v1.ScheduledOperation + (*Schedule)(nil), // 8: common.v1.Schedule + (*SingleSchedule)(nil), // 9: common.v1.SingleSchedule + (*RepeatedSchedule)(nil), // 10: common.v1.RepeatedSchedule + (*Operation)(nil), // 11: common.v1.Operation + (*UpdateSystemSoftwareOperation)(nil), // 12: common.v1.UpdateSystemSoftwareOperation + (*SetPowerStateOperation)(nil), // 13: common.v1.SetPowerStateOperation + (*PreOperation)(nil), // 14: common.v1.PreOperation + (*PostOperation)(nil), // 15: common.v1.PostOperation + (*Job)(nil), // 16: common.v1.Job + (*timestamp.Timestamp)(nil), // 17: google.protobuf.Timestamp + (*duration.Duration)(nil), // 18: google.protobuf.Duration } var file_common_v1_common_proto_depIdxs = []int32{ - 5, // 0: common.v1.NodeScheduledOperations.scheduled_operations:type_name -> common.v1.ScheduledOperation - 9, // 1: common.v1.ScheduledOperation.operation:type_name -> common.v1.Operation - 6, // 2: common.v1.ScheduledOperation.schedules:type_name -> common.v1.Schedule - 7, // 3: common.v1.Schedule.single_schedule:type_name -> common.v1.SingleSchedule - 8, // 4: common.v1.Schedule.repeated_schedule:type_name -> common.v1.RepeatedSchedule - 14, // 5: common.v1.SingleSchedule.start_time:type_name -> google.protobuf.Timestamp - 14, // 6: common.v1.SingleSchedule.end_time:type_name -> google.protobuf.Timestamp - 15, // 7: common.v1.RepeatedSchedule.duration:type_name -> google.protobuf.Duration - 12, // 8: common.v1.Operation.pre_operations:type_name -> common.v1.PreOperation - 13, // 9: common.v1.Operation.post_operations:type_name -> common.v1.PostOperation + 7, // 0: common.v1.NodeScheduledOperations.scheduled_operations:type_name -> common.v1.ScheduledOperation + 11, // 1: common.v1.ScheduledOperation.operation:type_name -> common.v1.Operation + 8, // 2: common.v1.ScheduledOperation.schedules:type_name -> common.v1.Schedule + 9, // 3: common.v1.Schedule.single_schedule:type_name -> common.v1.SingleSchedule + 10, // 4: common.v1.Schedule.repeated_schedule:type_name -> common.v1.RepeatedSchedule + 17, // 5: common.v1.SingleSchedule.start_time:type_name -> google.protobuf.Timestamp + 17, // 6: common.v1.SingleSchedule.end_time:type_name -> google.protobuf.Timestamp + 18, // 7: common.v1.RepeatedSchedule.duration:type_name -> google.protobuf.Duration + 14, // 8: common.v1.Operation.pre_operations:type_name -> common.v1.PreOperation + 15, // 9: common.v1.Operation.post_operations:type_name -> common.v1.PostOperation 0, // 10: common.v1.Operation.service_type:type_name -> common.v1.Operation.ServiceType - 10, // 11: common.v1.Operation.update_system_software_operation:type_name -> common.v1.UpdateSystemSoftwareOperation - 11, // 12: common.v1.Operation.set_power_state_operation:type_name -> common.v1.SetPowerStateOperation - 14, // 13: common.v1.UpdateSystemSoftwareOperation.release_date:type_name -> google.protobuf.Timestamp + 12, // 11: common.v1.Operation.update_system_software_operation:type_name -> common.v1.UpdateSystemSoftwareOperation + 13, // 12: common.v1.Operation.set_power_state_operation:type_name -> common.v1.SetPowerStateOperation + 17, // 13: common.v1.UpdateSystemSoftwareOperation.release_date:type_name -> google.protobuf.Timestamp 1, // 14: common.v1.UpdateSystemSoftwareOperation.mode:type_name -> common.v1.UpdateSystemSoftwareOperation.DownloadMode 2, // 15: common.v1.SetPowerStateOperation.opcode:type_name -> common.v1.SetPowerStateOperation.PowerState - 16, // [16:16] is the sub-list for method output_type - 16, // [16:16] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 3, // 16: common.v1.Job.executed_by:type_name -> common.v1.Job.ExecutedBy + 17, // 17: common.v1.Job.desired_start_time:type_name -> google.protobuf.Timestamp + 17, // 18: common.v1.Job.actual_start_time:type_name -> google.protobuf.Timestamp + 17, // 19: common.v1.Job.actual_end_time:type_name -> google.protobuf.Timestamp + 4, // 20: common.v1.Job.job_state:type_name -> common.v1.Job.JobState + 17, // 21: common.v1.Job.create_time:type_name -> google.protobuf.Timestamp + 22, // [22:22] is the sub-list for method output_type + 22, // [22:22] is the sub-list for method input_type + 22, // [22:22] is the sub-list for extension type_name + 22, // [22:22] is the sub-list for extension extendee + 0, // [0:22] is the sub-list for field type_name } func init() { file_common_v1_common_proto_init() } @@ -1213,6 +1522,18 @@ func file_common_v1_common_proto_init() { return nil } } + file_common_v1_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Job); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_common_v1_common_proto_msgTypes[3].OneofWrappers = []interface{}{ (*Schedule_SingleSchedule)(nil), @@ -1227,8 +1548,8 @@ func file_common_v1_common_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_v1_common_proto_rawDesc, - NumEnums: 3, - NumMessages: 11, + NumEnums: 5, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/inbm/proto/inbs-mock/pb/inbs_sb.pb.go b/inbm/proto/inbs-mock/pb/inbs_sb.pb.go index 8df7af5cc..c29c7f73c 100644 --- a/inbm/proto/inbs-mock/pb/inbs_sb.pb.go +++ b/inbm/proto/inbs-mock/pb/inbs_sb.pb.go @@ -296,6 +296,136 @@ func (*Ping) Descriptor() ([]byte, []int) { return file_inbs_v1_inbs_sb_proto_rawDescGZIP(), []int{4} } +type SendNodeUpdateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + // Types that are assignable to Update: + // + // *SendNodeUpdateRequest_JobUpdate + Update isSendNodeUpdateRequest_Update `protobuf_oneof:"update"` +} + +func (x *SendNodeUpdateRequest) Reset() { + *x = SendNodeUpdateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_inbs_v1_inbs_sb_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendNodeUpdateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendNodeUpdateRequest) ProtoMessage() {} + +func (x *SendNodeUpdateRequest) ProtoReflect() protoreflect.Message { + mi := &file_inbs_v1_inbs_sb_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendNodeUpdateRequest.ProtoReflect.Descriptor instead. +func (*SendNodeUpdateRequest) Descriptor() ([]byte, []int) { + return file_inbs_v1_inbs_sb_proto_rawDescGZIP(), []int{5} +} + +func (x *SendNodeUpdateRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (m *SendNodeUpdateRequest) GetUpdate() isSendNodeUpdateRequest_Update { + if m != nil { + return m.Update + } + return nil +} + +func (x *SendNodeUpdateRequest) GetJobUpdate() *Job { + if x, ok := x.GetUpdate().(*SendNodeUpdateRequest_JobUpdate); ok { + return x.JobUpdate + } + return nil +} + +type isSendNodeUpdateRequest_Update interface { + isSendNodeUpdateRequest_Update() +} + +type SendNodeUpdateRequest_JobUpdate struct { + JobUpdate *Job `protobuf:"bytes,3,opt,name=job_update,json=jobUpdate,proto3,oneof"` // node_id will be filled in by INBS; schedule_id, executed_by, desired_start_time, create_time will be ignored +} + +func (*SendNodeUpdateRequest_JobUpdate) isSendNodeUpdateRequest_Update() {} + +type SendNodeUpdateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *SendNodeUpdateResponse) Reset() { + *x = SendNodeUpdateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_inbs_v1_inbs_sb_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SendNodeUpdateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SendNodeUpdateResponse) ProtoMessage() {} + +func (x *SendNodeUpdateResponse) ProtoReflect() protoreflect.Message { + mi := &file_inbs_v1_inbs_sb_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SendNodeUpdateResponse.ProtoReflect.Descriptor instead. +func (*SendNodeUpdateResponse) Descriptor() ([]byte, []int) { + return file_inbs_v1_inbs_sb_proto_rawDescGZIP(), []int{6} +} + +func (x *SendNodeUpdateResponse) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *SendNodeUpdateResponse) GetError() *Error { + if x != nil { + return x.Error + } + return nil +} + var File_inbs_v1_inbs_sb_proto protoreflect.FileDescriptor var file_inbs_v1_inbs_sb_proto_rawDesc = []byte{ @@ -333,15 +463,33 @@ var file_inbs_v1_inbs_sb_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x06, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x32, 0x6f, 0x0a, 0x0d, 0x49, 0x4e, 0x42, - 0x53, 0x53, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5e, 0x0a, 0x11, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, - 0x22, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, - 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x22, 0x06, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x22, 0x71, 0x0a, 0x15, 0x53, 0x65, 0x6e, + 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, + 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x6a, 0x6f, 0x62, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x48, 0x00, 0x52, 0x09, 0x6a, 0x6f, 0x62, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x22, 0x5f, 0x0a, 0x16, + 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x26, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xc2, 0x01, + 0x0a, 0x0d, 0x49, 0x4e, 0x42, 0x53, 0x53, 0x42, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x5e, 0x0a, 0x11, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x21, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x49, 0x4e, 0x42, 0x4d, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x1e, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1f, 0x2e, 0x69, 0x6e, 0x62, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x4e, 0x6f, 0x64, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -356,29 +504,36 @@ func file_inbs_v1_inbs_sb_proto_rawDescGZIP() []byte { return file_inbs_v1_inbs_sb_proto_rawDescData } -var file_inbs_v1_inbs_sb_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_inbs_v1_inbs_sb_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_inbs_v1_inbs_sb_proto_goTypes = []interface{}{ (*HandleINBMCommandRequest)(nil), // 0: inbs.v1.HandleINBMCommandRequest (*HandleINBMCommandResponse)(nil), // 1: inbs.v1.HandleINBMCommandResponse (*INBMCommand)(nil), // 2: inbs.v1.INBMCommand (*UpdateScheduledOperations)(nil), // 3: inbs.v1.UpdateScheduledOperations (*Ping)(nil), // 4: inbs.v1.Ping - (*Error)(nil), // 5: common.v1.Error - (*ScheduledOperation)(nil), // 6: common.v1.ScheduledOperation + (*SendNodeUpdateRequest)(nil), // 5: inbs.v1.SendNodeUpdateRequest + (*SendNodeUpdateResponse)(nil), // 6: inbs.v1.SendNodeUpdateResponse + (*Error)(nil), // 7: common.v1.Error + (*ScheduledOperation)(nil), // 8: common.v1.ScheduledOperation + (*Job)(nil), // 9: common.v1.Job } var file_inbs_v1_inbs_sb_proto_depIdxs = []int32{ 2, // 0: inbs.v1.HandleINBMCommandRequest.command:type_name -> inbs.v1.INBMCommand - 5, // 1: inbs.v1.HandleINBMCommandResponse.error:type_name -> common.v1.Error + 7, // 1: inbs.v1.HandleINBMCommandResponse.error:type_name -> common.v1.Error 3, // 2: inbs.v1.INBMCommand.update_scheduled_operations:type_name -> inbs.v1.UpdateScheduledOperations 4, // 3: inbs.v1.INBMCommand.ping:type_name -> inbs.v1.Ping - 6, // 4: inbs.v1.UpdateScheduledOperations.scheduled_operations:type_name -> common.v1.ScheduledOperation - 1, // 5: inbs.v1.INBSSBService.HandleINBMCommand:input_type -> inbs.v1.HandleINBMCommandResponse - 0, // 6: inbs.v1.INBSSBService.HandleINBMCommand:output_type -> inbs.v1.HandleINBMCommandRequest - 6, // [6:7] is the sub-list for method output_type - 5, // [5:6] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 8, // 4: inbs.v1.UpdateScheduledOperations.scheduled_operations:type_name -> common.v1.ScheduledOperation + 9, // 5: inbs.v1.SendNodeUpdateRequest.job_update:type_name -> common.v1.Job + 7, // 6: inbs.v1.SendNodeUpdateResponse.error:type_name -> common.v1.Error + 1, // 7: inbs.v1.INBSSBService.HandleINBMCommand:input_type -> inbs.v1.HandleINBMCommandResponse + 5, // 8: inbs.v1.INBSSBService.SendNodeUpdate:input_type -> inbs.v1.SendNodeUpdateRequest + 0, // 9: inbs.v1.INBSSBService.HandleINBMCommand:output_type -> inbs.v1.HandleINBMCommandRequest + 6, // 10: inbs.v1.INBSSBService.SendNodeUpdate:output_type -> inbs.v1.SendNodeUpdateResponse + 9, // [9:11] is the sub-list for method output_type + 7, // [7:9] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_inbs_v1_inbs_sb_proto_init() } @@ -448,18 +603,45 @@ func file_inbs_v1_inbs_sb_proto_init() { return nil } } + file_inbs_v1_inbs_sb_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendNodeUpdateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_inbs_v1_inbs_sb_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SendNodeUpdateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_inbs_v1_inbs_sb_proto_msgTypes[2].OneofWrappers = []interface{}{ (*INBMCommand_UpdateScheduledOperations)(nil), (*INBMCommand_Ping)(nil), } + file_inbs_v1_inbs_sb_proto_msgTypes[5].OneofWrappers = []interface{}{ + (*SendNodeUpdateRequest_JobUpdate)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_inbs_v1_inbs_sb_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/inbm/proto/inbs-mock/pb/inbs_sb_grpc.pb.go b/inbm/proto/inbs-mock/pb/inbs_sb_grpc.pb.go index b5a19acbd..85a942eb1 100644 --- a/inbm/proto/inbs-mock/pb/inbs_sb_grpc.pb.go +++ b/inbm/proto/inbs-mock/pb/inbs_sb_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.6.1 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v3.12.4 // source: inbs/v1/inbs_sb.proto package pb @@ -15,11 +15,12 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( INBSSBService_HandleINBMCommand_FullMethodName = "/inbs.v1.INBSSBService/HandleINBMCommand" + INBSSBService_SendNodeUpdate_FullMethodName = "/inbs.v1.INBSSBService/SendNodeUpdate" ) // INBSSBServiceClient is the client API for INBSSBService service. @@ -28,6 +29,8 @@ const ( type INBSSBServiceClient interface { // Bi-directional streaming method HandleINBMCommand(ctx context.Context, opts ...grpc.CallOption) (INBSSBService_HandleINBMCommandClient, error) + // Used to send any kind of node status update + SendNodeUpdate(ctx context.Context, in *SendNodeUpdateRequest, opts ...grpc.CallOption) (*SendNodeUpdateResponse, error) } type iNBSSBServiceClient struct { @@ -39,12 +42,11 @@ func NewINBSSBServiceClient(cc grpc.ClientConnInterface) INBSSBServiceClient { } func (c *iNBSSBServiceClient) HandleINBMCommand(ctx context.Context, opts ...grpc.CallOption) (INBSSBService_HandleINBMCommandClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &INBSSBService_ServiceDesc.Streams[0], INBSSBService_HandleINBMCommand_FullMethodName, cOpts...) + stream, err := c.cc.NewStream(ctx, &INBSSBService_ServiceDesc.Streams[0], INBSSBService_HandleINBMCommand_FullMethodName, opts...) if err != nil { return nil, err } - x := &iNBSSBServiceHandleINBMCommandClient{ClientStream: stream} + x := &iNBSSBServiceHandleINBMCommandClient{stream} return x, nil } @@ -70,12 +72,23 @@ func (x *iNBSSBServiceHandleINBMCommandClient) Recv() (*HandleINBMCommandRequest return m, nil } +func (c *iNBSSBServiceClient) SendNodeUpdate(ctx context.Context, in *SendNodeUpdateRequest, opts ...grpc.CallOption) (*SendNodeUpdateResponse, error) { + out := new(SendNodeUpdateResponse) + err := c.cc.Invoke(ctx, INBSSBService_SendNodeUpdate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // INBSSBServiceServer is the server API for INBSSBService service. // All implementations must embed UnimplementedINBSSBServiceServer // for forward compatibility type INBSSBServiceServer interface { // Bi-directional streaming method HandleINBMCommand(INBSSBService_HandleINBMCommandServer) error + // Used to send any kind of node status update + SendNodeUpdate(context.Context, *SendNodeUpdateRequest) (*SendNodeUpdateResponse, error) mustEmbedUnimplementedINBSSBServiceServer() } @@ -86,6 +99,9 @@ type UnimplementedINBSSBServiceServer struct { func (UnimplementedINBSSBServiceServer) HandleINBMCommand(INBSSBService_HandleINBMCommandServer) error { return status.Errorf(codes.Unimplemented, "method HandleINBMCommand not implemented") } +func (UnimplementedINBSSBServiceServer) SendNodeUpdate(context.Context, *SendNodeUpdateRequest) (*SendNodeUpdateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SendNodeUpdate not implemented") +} func (UnimplementedINBSSBServiceServer) mustEmbedUnimplementedINBSSBServiceServer() {} // UnsafeINBSSBServiceServer may be embedded to opt out of forward compatibility for this service. @@ -100,7 +116,7 @@ func RegisterINBSSBServiceServer(s grpc.ServiceRegistrar, srv INBSSBServiceServe } func _INBSSBService_HandleINBMCommand_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(INBSSBServiceServer).HandleINBMCommand(&iNBSSBServiceHandleINBMCommandServer{ServerStream: stream}) + return srv.(INBSSBServiceServer).HandleINBMCommand(&iNBSSBServiceHandleINBMCommandServer{stream}) } type INBSSBService_HandleINBMCommandServer interface { @@ -125,13 +141,36 @@ func (x *iNBSSBServiceHandleINBMCommandServer) Recv() (*HandleINBMCommandRespons return m, nil } +func _INBSSBService_SendNodeUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SendNodeUpdateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(INBSSBServiceServer).SendNodeUpdate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: INBSSBService_SendNodeUpdate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(INBSSBServiceServer).SendNodeUpdate(ctx, req.(*SendNodeUpdateRequest)) + } + return interceptor(ctx, in, info, handler) +} + // INBSSBService_ServiceDesc is the grpc.ServiceDesc for INBSSBService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var INBSSBService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "inbs.v1.INBSSBService", HandlerType: (*INBSSBServiceServer)(nil), - Methods: []grpc.MethodDesc{}, + Methods: []grpc.MethodDesc{ + { + MethodName: "SendNodeUpdate", + Handler: _INBSSBService_SendNodeUpdate_Handler, + }, + }, Streams: []grpc.StreamDesc{ { StreamName: "HandleINBMCommand", diff --git a/inbm/proto/inbs/v1/inbs_sb.proto b/inbm/proto/inbs/v1/inbs_sb.proto index 0f73c7849..607476b86 100644 --- a/inbm/proto/inbs/v1/inbs_sb.proto +++ b/inbm/proto/inbs/v1/inbs_sb.proto @@ -6,6 +6,9 @@ import "common/v1/common.proto"; service INBSSBService { // Bi-directional streaming method rpc HandleINBMCommand(stream HandleINBMCommandResponse) returns (stream HandleINBMCommandRequest); + + // Used to send any kind of node status update + rpc SendNodeUpdate(SendNodeUpdateRequest) returns (SendNodeUpdateResponse); } message HandleINBMCommandRequest { @@ -29,4 +32,17 @@ message UpdateScheduledOperations { repeated common.v1.ScheduledOperation scheduled_operations = 1; } -message Ping {} \ No newline at end of file +message Ping {} + +message SendNodeUpdateRequest { + string request_id = 1; + oneof update { + common.v1.Job job_update = 3; // node_id will be filled in by INBS; schedule_id, executed_by, desired_start_time, create_time will be ignored + // more types of updates from nodes can be added in the future + } +} + +message SendNodeUpdateResponse { + string request_id = 1; + common.v1.Error error = 2; +}