diff --git a/inbm-lib/inbm_lib/constants.py b/inbm-lib/inbm_lib/constants.py index e922906ce..15695af32 100644 --- a/inbm-lib/inbm_lib/constants.py +++ b/inbm-lib/inbm_lib/constants.py @@ -22,7 +22,7 @@ CHROOT_PREFIX = "/usr/sbin/chroot /host " # XML parse time limit -PARSE_TIME_SECS = 10 +PARSE_TIME_SECS = 20 # TRTL install location TRTL_PATH = get_canonical_representation_of_path('/usr/bin/trtl') diff --git a/inbm/Changelog.md b/inbm/Changelog.md index 3ae46b3df..61b0f6144 100644 --- a/inbm/Changelog.md +++ b/inbm/Changelog.md @@ -7,6 +7,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Added - Updated proto files to add new RPC calls to allow edge node to update its status with INBS. + - (NEXMANAGE- 610) Add functionality to INBM Cloudadapter-agent to support OOB AMT RPC command requests from INBS + ### Fixed - (NEXMANAGE-746) Add extra sleeptime in INBM tpm script to resolve ARL platform issue diff --git a/inbm/cloudadapter-agent/cloudadapter/cloud/adapters/inbs/operation.py b/inbm/cloudadapter-agent/cloudadapter/cloud/adapters/inbs/operation.py index 44602eb42..9aa977c48 100644 --- a/inbm/cloudadapter-agent/cloudadapter/cloud/adapters/inbs/operation.py +++ b/inbm/cloudadapter-agent/cloudadapter/cloud/adapters/inbs/operation.py @@ -6,7 +6,7 @@ import xml.etree.ElementTree as ET from google.protobuf.timestamp_pb2 import Timestamp -from cloudadapter.pb.common.v1.common_pb2 import UpdateSystemSoftwareOperation, Operation, Schedule +from cloudadapter.pb.common.v1.common_pb2 import UpdateSystemSoftwareOperation, RpcActivateOperation, Operation, Schedule from cloudadapter.pb.inbs.v1.inbs_sb_pb2 import UpdateScheduledOperations @@ -91,7 +91,7 @@ def convert_updated_scheduled_operations_to_dispatcher_xml(request_id: str, upda def convert_operation_to_xml_manifests(operation: Operation) -> ET.Element: """Converts an Operation message to an XML manifests element containing manifest_xml subelements for dispatcher.""" - if not operation.HasField('update_system_software_operation'): + if not (operation.HasField('update_system_software_operation') or operation.HasField('rpc_activate_operation')): raise ValueError("Operation type not supported") if len(operation.pre_operations) > 0: @@ -99,14 +99,49 @@ def convert_operation_to_xml_manifests(operation: Operation) -> ET.Element: if len(operation.post_operations) > 0: raise ValueError("Post-operations not supported") + + result = create_xml_element("manifests") + + manifest = None + + if operation.update_system_software_operation is not None: + manifest = convert_system_software_operation_to_xml_manifest(operation.update_system_software_operation) + elif operation.rpc_activate_operation is not None: + manifest = convert_rpc_activate_operation_to_xml_manifest(operation.rpc_activate_operation) + else: + raise ValueError("No valid operation found") - result = create_xml_element('manifests') - for manifest in [convert_system_software_operation_to_xml_manifest(operation.update_system_software_operation)]: - xml_manifest = create_xml_element('manifest_xml', text=manifest) - result.append(xml_manifest) + xml_manifest = create_xml_element('manifest_xml', text=manifest) + result.append(xml_manifest) return result +def convert_rpc_activate_operation_to_xml_manifest(operation: RpcActivateOperation) -> str: + """Converts a RpcActivateOperation message to an XML manifest string for Dispatcher.""" + # Create the root element + manifest = ET.Element('manifest') + ET.SubElement(manifest, 'type').text = 'cmd' + + cmd = ET.SubElement(manifest, 'cmd') + header = ET.SubElement(cmd, 'header') + ET.SubElement(header, 'type').text = 'rpc' + + type = ET.SubElement(cmd, 'type') + rpc = ET.SubElement(type, 'rpc') + + if operation.url: + ET.SubElement(rpc, 'fetch').text = operation.url + + if operation.profile_name: + ET.SubElement(rpc, 'profileName').text = operation.profile_name + + # Generate the XML string with declaration + xml_declaration = '' + xml_str = ET.tostring(manifest, encoding='utf-8', method='xml').decode('utf-8') + return xml_declaration + '\n' + xml_str + + + def convert_system_software_operation_to_xml_manifest(operation: UpdateSystemSoftwareOperation) -> str: """Converts a UpdateSystemSoftwareOperation message to an XML manifest string for Dispatcher.""" # Create the root element 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 759a967c9..5cfe4577c 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\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') +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\"\xa5\x04\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\x12\x41\n\x16rpc_activate_operation\x18\x06 \x01(\x0b\x32\x1f.common.v1.RpcActivateOperationH\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\"9\n\x14RpcActivateOperation\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x14\n\x0cprofile_name\x18\x02 \x01(\t\"\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) @@ -36,25 +36,27 @@ _globals['_REPEATEDSCHEDULE']._serialized_start=602 _globals['_REPEATEDSCHEDULE']._serialized_end=790 _globals['_OPERATION']._serialized_start=793 - _globals['_OPERATION']._serialized_end=1275 - _globals['_OPERATION_SERVICETYPE']._serialized_start=1121 - _globals['_OPERATION_SERVICETYPE']._serialized_end=1262 - _globals['_UPDATESYSTEMSOFTWAREOPERATION']._serialized_start=1278 - _globals['_UPDATESYSTEMSOFTWAREOPERATION']._serialized_end=1622 - _globals['_UPDATESYSTEMSOFTWAREOPERATION_DOWNLOADMODE']._serialized_start=1489 - _globals['_UPDATESYSTEMSOFTWAREOPERATION_DOWNLOADMODE']._serialized_end=1622 - _globals['_SETPOWERSTATEOPERATION']._serialized_start=1625 - _globals['_SETPOWERSTATEOPERATION']._serialized_end=1842 - _globals['_SETPOWERSTATEOPERATION_POWERSTATE']._serialized_start=1714 - _globals['_SETPOWERSTATEOPERATION_POWERSTATE']._serialized_end=1842 - _globals['_PREOPERATION']._serialized_start=1844 - _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 + _globals['_OPERATION']._serialized_end=1342 + _globals['_OPERATION_SERVICETYPE']._serialized_start=1188 + _globals['_OPERATION_SERVICETYPE']._serialized_end=1329 + _globals['_RPCACTIVATEOPERATION']._serialized_start=1344 + _globals['_RPCACTIVATEOPERATION']._serialized_end=1401 + _globals['_UPDATESYSTEMSOFTWAREOPERATION']._serialized_start=1404 + _globals['_UPDATESYSTEMSOFTWAREOPERATION']._serialized_end=1748 + _globals['_UPDATESYSTEMSOFTWAREOPERATION_DOWNLOADMODE']._serialized_start=1615 + _globals['_UPDATESYSTEMSOFTWAREOPERATION_DOWNLOADMODE']._serialized_end=1748 + _globals['_SETPOWERSTATEOPERATION']._serialized_start=1751 + _globals['_SETPOWERSTATEOPERATION']._serialized_end=1968 + _globals['_SETPOWERSTATEOPERATION_POWERSTATE']._serialized_start=1840 + _globals['_SETPOWERSTATEOPERATION_POWERSTATE']._serialized_end=1968 + _globals['_PREOPERATION']._serialized_start=1970 + _globals['_PREOPERATION']._serialized_end=1984 + _globals['_POSTOPERATION']._serialized_start=1986 + _globals['_POSTOPERATION']._serialized_end=2001 + _globals['_JOB']._serialized_start=2004 + _globals['_JOB']._serialized_end=2589 + _globals['_JOB_EXECUTEDBY']._serialized_start=2412 + _globals['_JOB_EXECUTEDBY']._serialized_end=2498 + _globals['_JOB_JOBSTATE']._serialized_start=2500 + _globals['_JOB_JOBSTATE']._serialized_end=2589 # @@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 7a2e4a81e..d68668c05 100644 --- a/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi +++ b/inbm/cloudadapter-agent/cloudadapter/pb/common/v1/common_pb2.pyi @@ -204,6 +204,7 @@ 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 + RPC_ACTIVATE_OPERATION_FIELD_NUMBER: builtins.int service_type: global___Operation.ServiceType.ValueType @property def pre_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___PreOperation]: ... @@ -212,7 +213,9 @@ class Operation(google.protobuf.message.Message): @property def update_system_software_operation(self) -> global___UpdateSystemSoftwareOperation: ... @property - def set_power_state_operation(self) -> global___SetPowerStateOperation: + def set_power_state_operation(self) -> global___SetPowerStateOperation: ... + @property + def rpc_activate_operation(self) -> global___RpcActivateOperation: """and others""" def __init__( @@ -223,13 +226,32 @@ class Operation(google.protobuf.message.Message): service_type: global___Operation.ServiceType.ValueType = ..., update_system_software_operation: global___UpdateSystemSoftwareOperation | None = ..., set_power_state_operation: global___SetPowerStateOperation | None = ..., + rpc_activate_operation: global___RpcActivateOperation | None = ..., ) -> 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: ... + def HasField(self, field_name: typing.Literal["operation", b"operation", "rpc_activate_operation", b"rpc_activate_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", "rpc_activate_operation", b"rpc_activate_operation", "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", "rpc_activate_operation"] | None: ... global___Operation = Operation +@typing.final +class RpcActivateOperation(google.protobuf.message.Message): + DESCRIPTOR: google.protobuf.descriptor.Descriptor + + URL_FIELD_NUMBER: builtins.int + PROFILE_NAME_FIELD_NUMBER: builtins.int + url: builtins.str + profile_name: builtins.str + def __init__( + self, + *, + url: builtins.str = ..., + profile_name: builtins.str = ..., + ) -> None: ... + def ClearField(self, field_name: typing.Literal["profile_name", b"profile_name", "url", b"url"]) -> None: ... + +global___RpcActivateOperation = RpcActivateOperation + @typing.final class UpdateSystemSoftwareOperation(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor diff --git a/inbm/cloudadapter-agent/tests/unit/cloud/adapters/inbs/test_operation.py b/inbm/cloudadapter-agent/tests/unit/cloud/adapters/inbs/test_operation.py index 839c168e6..df36e46e9 100644 --- a/inbm/cloudadapter-agent/tests/unit/cloud/adapters/inbs/test_operation.py +++ b/inbm/cloudadapter-agent/tests/unit/cloud/adapters/inbs/test_operation.py @@ -7,6 +7,7 @@ import pytest from cloudadapter.pb.common.v1.common_pb2 import ( UpdateSystemSoftwareOperation, + RpcActivateOperation, Operation, PreOperation, PostOperation, @@ -25,10 +26,24 @@ # Import the function to be tested from cloudadapter.cloud.adapters.inbs.operation import ( convert_system_software_operation_to_xml_manifest, + convert_rpc_activate_operation_to_xml_manifest, convert_operation_to_xml_manifests, convert_updated_scheduled_operations_to_dispatcher_xml, ) +RPC_OPERATION_LARGE = RpcActivateOperation( + url="http://example.com/server", + profile_name="UDM", +) + +RPC_OPERATION_LARGE_MANIFEST_XML = ( + '\n' + "cmd
rpc
" + 'http://example.com/serverUDM' + "
" +) + + SOTA_OPERATION_LARGE = UpdateSystemSoftwareOperation( url="http://example.com/update", release_date=Timestamp(seconds=int(datetime(2023, 1, 1).timestamp())), @@ -204,6 +219,20 @@ def test_convert_system_software_operation_to_xml_manifest_success( assert xml_manifest == expected_xml +# Test cases for function that checks XML manifest creation from rpc activate operations +@pytest.mark.parametrize( + "operation, rpc_expected_xml", + [ + (RPC_OPERATION_LARGE, RPC_OPERATION_LARGE_MANIFEST_XML), + ], +) +def test_convert_rpc_activate_operation_to_xml_manifest_success( + operation, rpc_expected_xml +): + rpc_xml_manifest = convert_rpc_activate_operation_to_xml_manifest(operation) + assert rpc_xml_manifest == rpc_expected_xml + + @pytest.mark.parametrize( "operation, exception_message", [ diff --git a/inbm/generate-proto.sh b/inbm/generate-proto.sh index 255b39a6c..2c6bd2816 100755 --- a/inbm/generate-proto.sh +++ b/inbm/generate-proto.sh @@ -13,8 +13,8 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" echo Generating Python proto files. cd "$DIR/cloudadapter-agent" -python -m grpc_tools.protoc -I../proto --python_out=cloudadapter/pb --grpc_python_out=cloudadapter/pb --mypy_out=cloudadapter/pb ../proto/common/v1/common.proto -python -m grpc_tools.protoc -I../proto --python_out=cloudadapter/pb --grpc_python_out=cloudadapter/pb --mypy_out=cloudadapter/pb ../proto/inbs/v1/inbs_sb.proto +python3 -m grpc_tools.protoc -I../proto --python_out=cloudadapter/pb --grpc_python_out=cloudadapter/pb --mypy_out=cloudadapter/pb ../proto/common/v1/common.proto +python3 -m grpc_tools.protoc -I../proto --python_out=cloudadapter/pb --grpc_python_out=cloudadapter/pb --mypy_out=cloudadapter/pb ../proto/inbs/v1/inbs_sb.proto sed -i 's/ common.v1/ cloudadapter.pb.common.v1/' cloudadapter/pb/*/v1/*.py{,i} sed -i 's/\[common.v1.common_pb2/\[cloudadapter.pb.common.v1.common_pb2/' cloudadapter/pb/*/v1/*.py{,i} diff --git a/inbm/proto/common/v1/common.proto b/inbm/proto/common/v1/common.proto index e32b720d1..db39b49c0 100644 --- a/inbm/proto/common/v1/common.proto +++ b/inbm/proto/common/v1/common.proto @@ -63,10 +63,16 @@ message Operation { oneof operation { UpdateSystemSoftwareOperation update_system_software_operation = 4; SetPowerStateOperation set_power_state_operation = 5; + RpcActivateOperation rpc_activate_operation = 6; // and others } } +message RpcActivateOperation { + string url = 1; + string profile_name = 2; +} + message UpdateSystemSoftwareOperation { string url = 1; // URL from which to remotely retrieve the package google.protobuf.Timestamp release_date = 2; // Release date of the new SW update. diff --git a/inbm/proto/inbs-mock/pb/common.pb.go b/inbm/proto/inbs-mock/pb/common.pb.go index b42fa1336..541126231 100644 --- a/inbm/proto/inbs-mock/pb/common.pb.go +++ b/inbm/proto/inbs-mock/pb/common.pb.go @@ -126,7 +126,7 @@ func (x UpdateSystemSoftwareOperation_DownloadMode) Number() protoreflect.EnumNu // Deprecated: Use UpdateSystemSoftwareOperation_DownloadMode.Descriptor instead. func (UpdateSystemSoftwareOperation_DownloadMode) EnumDescriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{7, 0} + return file_common_v1_common_proto_rawDescGZIP(), []int{8, 0} } type SetPowerStateOperation_PowerState int32 @@ -181,7 +181,7 @@ func (x SetPowerStateOperation_PowerState) Number() protoreflect.EnumNumber { // Deprecated: Use SetPowerStateOperation_PowerState.Descriptor instead. func (SetPowerStateOperation_PowerState) EnumDescriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{8, 0} + return file_common_v1_common_proto_rawDescGZIP(), []int{9, 0} } type Job_ExecutedBy int32 @@ -230,7 +230,7 @@ func (x Job_ExecutedBy) Number() protoreflect.EnumNumber { // Deprecated: Use Job_ExecutedBy.Descriptor instead. func (Job_ExecutedBy) EnumDescriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{11, 0} + return file_common_v1_common_proto_rawDescGZIP(), []int{12, 0} } type Job_JobState int32 @@ -285,7 +285,7 @@ func (x Job_JobState) Number() protoreflect.EnumNumber { // Deprecated: Use Job_JobState.Descriptor instead. func (Job_JobState) EnumDescriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{11, 1} + return file_common_v1_common_proto_rawDescGZIP(), []int{12, 1} } type Error struct { @@ -703,6 +703,7 @@ type Operation struct { // // *Operation_UpdateSystemSoftwareOperation // *Operation_SetPowerStateOperation + // *Operation_RpcActivateOperation Operation isOperation_Operation `protobuf_oneof:"operation"` } @@ -780,6 +781,13 @@ func (x *Operation) GetSetPowerStateOperation() *SetPowerStateOperation { return nil } +func (x *Operation) GetRpcActivateOperation() *RpcActivateOperation { + if x, ok := x.GetOperation().(*Operation_RpcActivateOperation); ok { + return x.RpcActivateOperation + } + return nil +} + type isOperation_Operation interface { isOperation_Operation() } @@ -789,13 +797,74 @@ type Operation_UpdateSystemSoftwareOperation struct { } type Operation_SetPowerStateOperation struct { - SetPowerStateOperation *SetPowerStateOperation `protobuf:"bytes,5,opt,name=set_power_state_operation,json=setPowerStateOperation,proto3,oneof"` // and others + SetPowerStateOperation *SetPowerStateOperation `protobuf:"bytes,5,opt,name=set_power_state_operation,json=setPowerStateOperation,proto3,oneof"` +} + +type Operation_RpcActivateOperation struct { + RpcActivateOperation *RpcActivateOperation `protobuf:"bytes,6,opt,name=rpc_activate_operation,json=rpcActivateOperation,proto3,oneof"` // and others } func (*Operation_UpdateSystemSoftwareOperation) isOperation_Operation() {} func (*Operation_SetPowerStateOperation) isOperation_Operation() {} +func (*Operation_RpcActivateOperation) isOperation_Operation() {} + +type RpcActivateOperation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + ProfileName string `protobuf:"bytes,2,opt,name=profile_name,json=profileName,proto3" json:"profile_name,omitempty"` +} + +func (x *RpcActivateOperation) Reset() { + *x = RpcActivateOperation{} + if protoimpl.UnsafeEnabled { + mi := &file_common_v1_common_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RpcActivateOperation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RpcActivateOperation) ProtoMessage() {} + +func (x *RpcActivateOperation) ProtoReflect() protoreflect.Message { + mi := &file_common_v1_common_proto_msgTypes[7] + 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 RpcActivateOperation.ProtoReflect.Descriptor instead. +func (*RpcActivateOperation) Descriptor() ([]byte, []int) { + return file_common_v1_common_proto_rawDescGZIP(), []int{7} +} + +func (x *RpcActivateOperation) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *RpcActivateOperation) GetProfileName() string { + if x != nil { + return x.ProfileName + } + return "" +} + type UpdateSystemSoftwareOperation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -811,7 +880,7 @@ type UpdateSystemSoftwareOperation struct { func (x *UpdateSystemSoftwareOperation) Reset() { *x = UpdateSystemSoftwareOperation{} if protoimpl.UnsafeEnabled { - mi := &file_common_v1_common_proto_msgTypes[7] + mi := &file_common_v1_common_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -824,7 +893,7 @@ func (x *UpdateSystemSoftwareOperation) String() string { func (*UpdateSystemSoftwareOperation) ProtoMessage() {} func (x *UpdateSystemSoftwareOperation) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[7] + mi := &file_common_v1_common_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -837,7 +906,7 @@ func (x *UpdateSystemSoftwareOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateSystemSoftwareOperation.ProtoReflect.Descriptor instead. func (*UpdateSystemSoftwareOperation) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{7} + return file_common_v1_common_proto_rawDescGZIP(), []int{8} } func (x *UpdateSystemSoftwareOperation) GetUrl() string { @@ -886,7 +955,7 @@ type SetPowerStateOperation struct { func (x *SetPowerStateOperation) Reset() { *x = SetPowerStateOperation{} if protoimpl.UnsafeEnabled { - mi := &file_common_v1_common_proto_msgTypes[8] + mi := &file_common_v1_common_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -899,7 +968,7 @@ func (x *SetPowerStateOperation) String() string { func (*SetPowerStateOperation) ProtoMessage() {} func (x *SetPowerStateOperation) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[8] + mi := &file_common_v1_common_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -912,7 +981,7 @@ func (x *SetPowerStateOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use SetPowerStateOperation.ProtoReflect.Descriptor instead. func (*SetPowerStateOperation) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{8} + return file_common_v1_common_proto_rawDescGZIP(), []int{9} } func (x *SetPowerStateOperation) GetOpcode() SetPowerStateOperation_PowerState { @@ -931,7 +1000,7 @@ type PreOperation struct { func (x *PreOperation) Reset() { *x = PreOperation{} if protoimpl.UnsafeEnabled { - mi := &file_common_v1_common_proto_msgTypes[9] + mi := &file_common_v1_common_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -944,7 +1013,7 @@ func (x *PreOperation) String() string { func (*PreOperation) ProtoMessage() {} func (x *PreOperation) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[9] + mi := &file_common_v1_common_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -957,7 +1026,7 @@ func (x *PreOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use PreOperation.ProtoReflect.Descriptor instead. func (*PreOperation) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{9} + return file_common_v1_common_proto_rawDescGZIP(), []int{10} } type PostOperation struct { @@ -969,7 +1038,7 @@ type PostOperation struct { func (x *PostOperation) Reset() { *x = PostOperation{} if protoimpl.UnsafeEnabled { - mi := &file_common_v1_common_proto_msgTypes[10] + mi := &file_common_v1_common_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -982,7 +1051,7 @@ func (x *PostOperation) String() string { func (*PostOperation) ProtoMessage() {} func (x *PostOperation) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[10] + mi := &file_common_v1_common_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -995,7 +1064,7 @@ func (x *PostOperation) ProtoReflect() protoreflect.Message { // Deprecated: Use PostOperation.ProtoReflect.Descriptor instead. func (*PostOperation) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{10} + return file_common_v1_common_proto_rawDescGZIP(), []int{11} } // this message represents a Job and can be used in multiple contexts; see RPC definitions @@ -1022,7 +1091,7 @@ type Job struct { func (x *Job) Reset() { *x = Job{} if protoimpl.UnsafeEnabled { - mi := &file_common_v1_common_proto_msgTypes[11] + mi := &file_common_v1_common_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1035,7 +1104,7 @@ func (x *Job) String() string { func (*Job) ProtoMessage() {} func (x *Job) ProtoReflect() protoreflect.Message { - mi := &file_common_v1_common_proto_msgTypes[11] + mi := &file_common_v1_common_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1048,7 +1117,7 @@ func (x *Job) ProtoReflect() protoreflect.Message { // Deprecated: Use Job.ProtoReflect.Descriptor instead. func (*Job) Descriptor() ([]byte, []int) { - return file_common_v1_common_proto_rawDescGZIP(), []int{11} + return file_common_v1_common_proto_rawDescGZIP(), []int{12} } func (x *Job) GetJobId() string { @@ -1193,7 +1262,7 @@ var file_common_v1_common_proto_rawDesc = []byte{ 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, + 0x22, 0x9e, 0x05, 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, @@ -1219,104 +1288,114 @@ var file_common_v1_common_proto_rawDesc = []byte{ 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, 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, 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, + 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x16, 0x72, + 0x70, 0x63, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x70, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x14, + 0x72, 0x70, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 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, 0x4b, 0x0a, 0x14, 0x52, 0x70, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 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, 0x21, 0x0a, 0x0c, 0x70, + 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 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, 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, 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, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 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 ( @@ -1332,7 +1411,7 @@ func file_common_v1_common_proto_rawDescGZIP() []byte { } 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_msgTypes = make([]protoimpl.MessageInfo, 13) var file_common_v1_common_proto_goTypes = []interface{}{ (Operation_ServiceType)(0), // 0: common.v1.Operation.ServiceType (UpdateSystemSoftwareOperation_DownloadMode)(0), // 1: common.v1.UpdateSystemSoftwareOperation.DownloadMode @@ -1346,13 +1425,14 @@ var file_common_v1_common_proto_goTypes = []interface{}{ (*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 + (*RpcActivateOperation)(nil), // 12: common.v1.RpcActivateOperation + (*UpdateSystemSoftwareOperation)(nil), // 13: common.v1.UpdateSystemSoftwareOperation + (*SetPowerStateOperation)(nil), // 14: common.v1.SetPowerStateOperation + (*PreOperation)(nil), // 15: common.v1.PreOperation + (*PostOperation)(nil), // 16: common.v1.PostOperation + (*Job)(nil), // 17: common.v1.Job + (*timestamp.Timestamp)(nil), // 18: google.protobuf.Timestamp + (*duration.Duration)(nil), // 19: google.protobuf.Duration } var file_common_v1_common_proto_depIdxs = []int32{ 7, // 0: common.v1.NodeScheduledOperations.scheduled_operations:type_name -> common.v1.ScheduledOperation @@ -1360,28 +1440,29 @@ var file_common_v1_common_proto_depIdxs = []int32{ 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 + 18, // 5: common.v1.SingleSchedule.start_time:type_name -> google.protobuf.Timestamp + 18, // 6: common.v1.SingleSchedule.end_time:type_name -> google.protobuf.Timestamp + 19, // 7: common.v1.RepeatedSchedule.duration:type_name -> google.protobuf.Duration + 15, // 8: common.v1.Operation.pre_operations:type_name -> common.v1.PreOperation + 16, // 9: common.v1.Operation.post_operations:type_name -> common.v1.PostOperation 0, // 10: common.v1.Operation.service_type:type_name -> common.v1.Operation.ServiceType - 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 - 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 + 13, // 11: common.v1.Operation.update_system_software_operation:type_name -> common.v1.UpdateSystemSoftwareOperation + 14, // 12: common.v1.Operation.set_power_state_operation:type_name -> common.v1.SetPowerStateOperation + 12, // 13: common.v1.Operation.rpc_activate_operation:type_name -> common.v1.RpcActivateOperation + 18, // 14: common.v1.UpdateSystemSoftwareOperation.release_date:type_name -> google.protobuf.Timestamp + 1, // 15: common.v1.UpdateSystemSoftwareOperation.mode:type_name -> common.v1.UpdateSystemSoftwareOperation.DownloadMode + 2, // 16: common.v1.SetPowerStateOperation.opcode:type_name -> common.v1.SetPowerStateOperation.PowerState + 3, // 17: common.v1.Job.executed_by:type_name -> common.v1.Job.ExecutedBy + 18, // 18: common.v1.Job.desired_start_time:type_name -> google.protobuf.Timestamp + 18, // 19: common.v1.Job.actual_start_time:type_name -> google.protobuf.Timestamp + 18, // 20: common.v1.Job.actual_end_time:type_name -> google.protobuf.Timestamp + 4, // 21: common.v1.Job.job_state:type_name -> common.v1.Job.JobState + 18, // 22: common.v1.Job.create_time:type_name -> google.protobuf.Timestamp + 23, // [23:23] is the sub-list for method output_type + 23, // [23:23] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_common_v1_common_proto_init() } @@ -1475,7 +1556,7 @@ func file_common_v1_common_proto_init() { } } file_common_v1_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSystemSoftwareOperation); i { + switch v := v.(*RpcActivateOperation); i { case 0: return &v.state case 1: @@ -1487,7 +1568,7 @@ func file_common_v1_common_proto_init() { } } file_common_v1_common_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetPowerStateOperation); i { + switch v := v.(*UpdateSystemSoftwareOperation); i { case 0: return &v.state case 1: @@ -1499,7 +1580,7 @@ func file_common_v1_common_proto_init() { } } file_common_v1_common_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PreOperation); i { + switch v := v.(*SetPowerStateOperation); i { case 0: return &v.state case 1: @@ -1511,7 +1592,7 @@ func file_common_v1_common_proto_init() { } } file_common_v1_common_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PostOperation); i { + switch v := v.(*PreOperation); i { case 0: return &v.state case 1: @@ -1523,6 +1604,18 @@ func file_common_v1_common_proto_init() { } } file_common_v1_common_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PostOperation); 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[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Job); i { case 0: return &v.state @@ -1542,6 +1635,7 @@ func file_common_v1_common_proto_init() { file_common_v1_common_proto_msgTypes[6].OneofWrappers = []interface{}{ (*Operation_UpdateSystemSoftwareOperation)(nil), (*Operation_SetPowerStateOperation)(nil), + (*Operation_RpcActivateOperation)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -1549,7 +1643,7 @@ func file_common_v1_common_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_v1_common_proto_rawDesc, NumEnums: 5, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 0, },