diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5971688..8c33c92 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -6,12 +6,13 @@ "runArgs": [ "--name=spacesdk-client" ], - "workspaceFolder": "/workspaces/spacesdk-client", - "workspaceMount": "source=${localWorkspaceFolder},target=/workspaces/spacesdk-client,type=bind,consistency=cached", + "workspaceFolder": "/workspace/spacesdk-client", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/spacesdk-client,type=bind,consistency=cached", "features": { "ghcr.io/microsoft/azure-orbital-space-sdk/spacefx-dev:0.11.0": { "app_name": "spacesdk-client", - "app_type": "spacesdk-client" + "app_type": "spacesdk-client", + "dev_language": "python" } }, "hostRequirements": { diff --git a/.vscode/launch.json b/.vscode/launch.json index 7216215..b5b14ea 100755 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,6 +33,29 @@ }, "requireExactSource": true }, + { + "name": "DebugClient (Python)", + "type": "debugpy", + "request": "attach", + "preLaunchTask": "deploy-debugshim-client-python", + "connect": { + "host": "localhost", + "port": 5678, + }, + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "${workspaceFolder}" + } + ], + "justMyCode": true, + "postDebugTask": "reset-debugshim-client", + "presentation": { + "hidden": false, + "group": "", + "order": 1 + } + }, { "name": "Integration Tests - Debug (DotNet)", "type": "coreclr", @@ -95,6 +118,29 @@ "group": "integrationtests", "order": 2 }, - } + }, + { + "name": "Integration Tests (python) - Run", + "type": "debugpy", + "request": "attach", + "preLaunchTask": "deploy-debugshim-client-integrationtest-python", + "connect": { + "host": "localhost", + "port": 5678, + }, + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "${workspaceFolder}" + } + ], + "justMyCode": true, + "postDebugTask": "reset-debugshim-client", + "presentation": { + "hidden": false, + "group": "integrationtests", + "order": 3 + }, + }, ] } \ No newline at end of file diff --git a/.vscode/projectPostBuild.sh b/.vscode/projectPostBuild.sh index 3c4c907..40f8415 100755 --- a/.vscode/projectPostBuild.sh +++ b/.vscode/projectPostBuild.sh @@ -24,7 +24,7 @@ #------------------------------------------------------------------------------------------------------------- source "${SPACEFX_DIR:?}/modules/load_modules.sh" $@ --log_dir "${SPACEFX_DIR:?}/logs/${APP_NAME:?}" -cd /workspaces/spacesdk-client +cd ${CONTAINER_WORKING_DIR} ############################################################ # Script variables @@ -32,8 +32,9 @@ cd /workspaces/spacesdk-client DEBUG=false RELEASE=false TARGET_DIR="" -PYTHON_DLL_DIR="/workspaces/spacesdk-client/spacefx/spacefxClient" -DOTNET_DLL_BUILD_DIR_PREFIX="/workspaces/spacesdk-client/src/bin" + +PYTHON_DLL_DIR="${CONTAINER_WORKING_DIR}/spacefx/spacefxClient" +DOTNET_DLL_BUILD_DIR_PREFIX="${CONTAINER_WORKING_DIR}/src/bin" DOTNET_DLL_BUILD_DIR_SUFFIX="/net6.0" DOTNET_DLL_BUILD_DIR="" ############################################################ diff --git a/.vscode/tasks.json b/.vscode/tasks.json index e5b44b7..3f53b32 100755 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -30,6 +30,60 @@ "clear": false } }, + { + "label": "deploy-debugshim-client-integrationtest-python", + "isBackground": false, + "dependsOn": [ + "build-client" + ], + "command": "/bin/bash", + "type": "shell", + "args": [ + "/spacefx-dev/debugShim-deploy.sh", + "--debug_shim", + "${DEBUG_SHIM_CLIENT}", + "--python_file", + "${workspaceFolder}/test/integrationTests_python/integrationTest.py", + "--port", + "5678", + "--disable_plugin_configs" + ], + "presentation": { + "echo": true, + "reveal": "never", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": false + } + }, + { + "label": "deploy-debugshim-client-python", + "isBackground": false, + "dependsOn": [ + "build-client" + ], + "command": "/bin/bash", + "type": "shell", + "args": [ + "/spacefx-dev/debugShim-deploy.sh", + "--debug_shim", + "${DEBUG_SHIM_CLIENT}", + "--python_file", + "${workspaceFolder}/test/debugClient_python/debugClient.py", + "--port", + "5678", + "--disable_plugin_configs" + ], + "presentation": { + "echo": true, + "reveal": "never", + "focus": false, + "panel": "shared", + "showReuseMessage": false, + "clear": false + } + }, { "label": "reset-debugshim-client", "isBackground": true, diff --git a/spacefx/__init__.py b/spacefx/__init__.py index e69de29..f7cab79 100644 --- a/spacefx/__init__.py +++ b/spacefx/__init__.py @@ -0,0 +1,9 @@ +from spacefx import protos +from spacefx import _sdk_client +from spacefx import client +from spacefx import logging +from spacefx import position +from spacefx import link +from spacefx import sensor + +logger = logging.__SpaceFxLogger diff --git a/spacefx/_sdk_client.py b/spacefx/_sdk_client.py index c114739..ebfe080 100644 --- a/spacefx/_sdk_client.py +++ b/spacefx/_sdk_client.py @@ -1,8 +1,26 @@ import os - import pythonnet +def find_git_root(starting_directory): + """ + Search for a .git directory by moving up the directory tree from the starting directory. + If found, return the path to the directory containing the .git directory. + If not found and the root of the directory tree is reached, return None. + """ + current_directory = starting_directory + while True: + # Check if .git directory exists in the current directory + if os.path.isdir(os.path.join(current_directory, ".git")): + return os.path.join(current_directory, ".git") + # Move up one directory level + parent_directory = os.path.dirname(current_directory) + if parent_directory == current_directory: + # Root of the directory tree is reached without finding .git + return None + current_directory = parent_directory + + def search_file(filename, search_path): """Search for a file recursively in a directory tree.""" for dirpath, _, filenames in os.walk(search_path): @@ -11,42 +29,54 @@ def search_file(filename, search_path): return os.path.join(dirpath, file) raise FileNotFoundError(f"{filename} not found in {search_path}") +# Find the dotnet directory +PROD_DOTNET_DIR = "/usr/share/dotnet/shared" +DOTNET_DIR="" -prod_dotnet_dir = "/usr/share/dotnet/shared" -dev_dotnet_dir = "/root/.dotnet/shared" -dotnet_dir = "" +# SpaceFX-Dev installed dotnet to the .git directory so it can be used by the +# debugShim and the devcontainer. This will locate the .git directory by +# walking up the tree +DEV_DOTNET_DIR = find_git_root(os.path.dirname(os.path.abspath(__file__))) + +if DEV_DOTNET_DIR: + DEV_DOTNET_DIR = os.path.join(DEV_DOTNET_DIR, "spacefx-dev", "dotnet", "shared") + DOTNET_DIR = DEV_DOTNET_DIR if os.path.exists(DEV_DOTNET_DIR) else None + +if not DOTNET_DIR: + DOTNET_DIR = PROD_DOTNET_DIR if os.path.exists(PROD_DOTNET_DIR) else None + +if not DOTNET_DIR: + raise ValueError(f"Was not able to find dotnet directory as '{PROD_DOTNET_DIR}' nor within a '{DEV_DOTNET_DIR}'. Please check that dotnet is installed") -if os.path.exists(prod_dotnet_dir): - dotnet_dir = prod_dotnet_dir -elif os.path.exists(dev_dotnet_dir): - dotnet_dir = dev_dotnet_dir -else: - raise ValueError(f"Was not able to find dotnet directory as '{prod_dotnet_dir}' nor '{dev_dotnet_dir}'. Please check that dotnet is installed") # Recursively search and load the runtimeconfig.json - this allows for dotnet minor version changes -runtimeconfig_file = search_file("Microsoft.AspNetCore.App.runtimeconfig.json", dotnet_dir) +runtimeconfig_file = search_file("Microsoft.AspNetCore.App.runtimeconfig.json", DOTNET_DIR) pythonnet.load("coreclr", runtime_config=runtimeconfig_file) import clr from System.Reflection import Assembly # Load the dotnet dlls by walking down the tree -for dirpath, dirnames, filenames in os.walk(os.path.join(dotnet_dir, 'Microsoft.AspNetCore.App')): +for dirpath, dirnames, filenames in os.walk(os.path.join(DOTNET_DIR, 'Microsoft.AspNetCore.App')): if "runtimes" in dirpath: continue for file in filenames: if file.endswith(".dll"): Assembly.LoadFile(os.path.join(dirpath, file)) + # Load the client adapter library which is in the parent directory / spacefxClient -for dirpath, dirnames, filenames in os.walk(os.path.join(os.path.dirname(__file__), 'spacefxClient')): - if "runtimes" in dirpath: - continue - for file in filenames: - if file.endswith(".dll"): - dll_lib = Assembly.LoadFile(os.path.join(dirpath, file)) - if file == "sdk-dotnet.dll": - assembly = clr.AddReference(os.path.join(dirpath, file)) +base_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'spacefxClient') + +# Find "spacesdk-client.dll" in any subdirectory +spacesdk_client_dll = next(base_dir.rglob('spacesdk-client.dll'), None) + +# Found it. Add it +if spacesdk_client_dll: + assembly = clr.AddReference(str(spacesdk_client_dll)) +else: + raise ValueError(f"The DLL 'spacesdk-client.dll' was not found in '{str(base_dir)}'. Please check that the client library was built and deployed to '{str(base_dir)}'") + # Import the .NET SpaceFx namespace import Microsoft.Azure.SpaceFx diff --git a/spacefx/common/Common_pb2.py b/spacefx/common/Common_pb2.py deleted file mode 100644 index 7453aa1..0000000 --- a/spacefx/common/Common_pb2.py +++ /dev/null @@ -1,297 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: spacefx/common/Common.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bspacefx/common/Common.proto\x12-Microsoft.Azure.SpaceFx.MessageFormats.Common\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xd8\x01\n\rRequestHeader\x12\x12\n\ntrackingId\x18\x01 \x01(\t\x12\x15\n\rcorrelationId\x18\x02 \x01(\t\x12\r\n\x05\x61ppId\x18\x03 \x01(\t\x12\\\n\x08metadata\x18\x04 \x03(\x0b\x32J.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb7\x02\n\x0eResponseHeader\x12\x12\n\ntrackingId\x18\x01 \x01(\t\x12\x15\n\rcorrelationId\x18\x02 \x01(\t\x12J\n\x06status\x18\x03 \x01(\x0e\x32:.Microsoft.Azure.SpaceFx.MessageFormats.Common.StatusCodes\x12\x0f\n\x07message\x18\x04 \x01(\t\x12\r\n\x05\x61ppId\x18\x05 \x01(\t\x12]\n\x08metadata\x18\x06 \x03(\x0b\x32K.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8d\x02\n\x0eHeartBeatPulse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12\r\n\x05\x61ppId\x18\x02 \x01(\t\x12\x35\n\x11\x63urrentSystemTime\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x30\n\x0c\x61ppStartTime\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x10pulseFrequencyMS\x18\x06 \x01(\x05\x12\x12\n\nappVersion\x18\x07 \x01(\t\"\xb5\x01\n\x0b\x44irectToApp\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12\x13\n\x0bsourceAppId\x18\x03 \x01(\t\x12\x13\n\x0bmessageType\x18\x04 \x01(\t\x12%\n\x07message\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\"\xf8\x01\n\tCacheItem\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x30\n\x0c\x63reationTime\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\x0e\x65xpirationTime\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\"\n\x04item\x18\x05 \x01(\x0b\x32\x14.google.protobuf.Any\"i\n\x12HealthCheckRequest\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\"l\n\x13HealthCheckResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\"o\n\x18PluginHealthCheckRequest\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\"r\n\x19PluginHealthCheckResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\"\xe5\x01\n\x1ePluginHealthCheckMultiResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12l\n\x1apluginHealthCheckResponses\x18\x02 \x03(\x0b\x32H.Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginHealthCheckResponse\"q\n\x1aPluginConfigurationRequest\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\"\xbc\x03\n\x1bPluginConfigurationResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12h\n\x07plugins\x18\x02 \x03(\x0b\x32W.Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginConfigurationResponse.PluginConfig\x1a\xdb\x01\n\x0cPluginConfig\x12J\n\x06status\x18\x01 \x01(\x0e\x32:.Microsoft.Azure.SpaceFx.MessageFormats.Common.StatusCodes\x12\x12\n\npluginName\x18\x02 \x01(\t\x12\x12\n\npluginPath\x18\x03 \x01(\t\x12\x18\n\x10processing_order\x18\x04 \x01(\x05\x12\x0f\n\x07\x65nabled\x18\x05 \x01(\x08\x12\x17\n\x0f\x63orePermissions\x18\x06 \x01(\t\x12\x13\n\x0bpermissions\x18\x07 \x01(\t\"\xdc\x01\n\x0fTelemetryMetric\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12\x12\n\nmetricName\x18\x02 \x01(\t\x12\x30\n\x0bmetricValue\x18\x03 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x12.\n\nmetricTime\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xc5\x01\n\x14TelemetryMultiMetric\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12X\n\x10telemetryMetrics\x18\x02 \x03(\x0b\x32>.Microsoft.Azure.SpaceFx.MessageFormats.Common.TelemetryMetric\"p\n\x17TelemetryMetricResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\"u\n\x1cTelemetryMultiMetricResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\"\xd2\x05\n\nLogMessage\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12U\n\x08logLevel\x18\x02 \x01(\x0e\x32\x43.Microsoft.Azure.SpaceFx.MessageFormats.Common.LogMessage.LOG_LEVEL\x12\x0f\n\x07message\x18\x03 \x01(\t\x12I\n\x08priority\x18\x04 \x01(\x0e\x32\x37.Microsoft.Azure.SpaceFx.MessageFormats.Common.Priority\x12\x10\n\x08\x63\x61tegory\x18\x05 \x01(\t\x12\x13\n\x0bsubCategory\x18\x06 \x01(\t\x12.\n\tintValues\x18\x07 \x03(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x30\n\x0b\x66loatValues\x18\x08 \x03(\x0b\x32\x1b.google.protobuf.FloatValue\x12\x32\n\x0e\x64\x61teTimeValues\x18\t \x03(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cstringValues\x18\n \x03(\t\x12+\n\x07logTime\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x0flogReceivedTime\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1b\n\x13logTimeUserReadable\x18\r \x01(\t\"j\n\tLOG_LEVEL\x12\t\n\x05TRACE\x10\x00\x12\t\n\x05\x44\x45\x42UG\x10\x01\x12\x08\n\x04INFO\x10\x02\x12\x0b\n\x07WARNING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08\x43RITICAL\x10\x05\x12\x08\n\x04NONE\x10\x06\x12\r\n\tTELEMETRY\x10\x07\"k\n\x12LogMessageResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader*\x1d\n\x06Topics\x12\x13\n\x0fHEARTBEAT_PULSE\x10\x00*\xad\x02\n\x0bStatusCodes\x12\x0e\n\nSUCCESSFUL\x10\x00\x12\x10\n\x0cUNAUTHORIZED\x10\x01\x12\r\n\tFORBIDDEN\x10\x02\x12\r\n\tNOT_FOUND\x10\x03\x12\x13\n\x0fGENERAL_FAILURE\x10\x04\x12\x0b\n\x07HEALTHY\x10\x05\x12\t\n\x05READY\x10\x06\x12\x0b\n\x07PENDING\x10\x07\x12\x10\n\x0cTRANSMITTING\x10\x08\x12\x12\n\x0eNOT_APPLICABLE\x10\t\x12\x0c\n\x08REJECTED\x10\n\x12\x0b\n\x07REQUEST\x10\x0b\x12\x17\n\x13SERVICE_UNAVAILABLE\x10\x0c\x12\x0b\n\x07TIMEOUT\x10\r\x12\x1a\n\x16INTERNAL_SERVICE_ERROR\x10\x0e\x12\x14\n\x10INVALID_ARGUMENT\x10\x0f\x12\x0b\n\x07UNKNOWN\x10\x10*7\n\x08Priority\x12\x07\n\x03LOW\x10\x00\x12\n\n\x06MEDIUM\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\x0c\n\x08\x43RITICAL\x10\x03*?\n\x0cHostServices\x12\x0b\n\x07LOGGING\x10\x00\x12\x0c\n\x08POSITION\x10\x01\x12\n\n\x06SENSOR\x10\x02\x12\x08\n\x04LINK\x10\x03*+\n\x10PlatformServices\x12\x0e\n\nDEPLOYMENT\x10\x00\x12\x07\n\x03MTS\x10\x01\x42\x30\xaa\x02-Microsoft.Azure.SpaceFx.MessageFormats.Commonb\x06proto3') - -_TOPICS = DESCRIPTOR.enum_types_by_name['Topics'] -Topics = enum_type_wrapper.EnumTypeWrapper(_TOPICS) -_STATUSCODES = DESCRIPTOR.enum_types_by_name['StatusCodes'] -StatusCodes = enum_type_wrapper.EnumTypeWrapper(_STATUSCODES) -_PRIORITY = DESCRIPTOR.enum_types_by_name['Priority'] -Priority = enum_type_wrapper.EnumTypeWrapper(_PRIORITY) -_HOSTSERVICES = DESCRIPTOR.enum_types_by_name['HostServices'] -HostServices = enum_type_wrapper.EnumTypeWrapper(_HOSTSERVICES) -_PLATFORMSERVICES = DESCRIPTOR.enum_types_by_name['PlatformServices'] -PlatformServices = enum_type_wrapper.EnumTypeWrapper(_PLATFORMSERVICES) -HEARTBEAT_PULSE = 0 -SUCCESSFUL = 0 -UNAUTHORIZED = 1 -FORBIDDEN = 2 -NOT_FOUND = 3 -GENERAL_FAILURE = 4 -HEALTHY = 5 -READY = 6 -PENDING = 7 -TRANSMITTING = 8 -NOT_APPLICABLE = 9 -REJECTED = 10 -REQUEST = 11 -SERVICE_UNAVAILABLE = 12 -TIMEOUT = 13 -INTERNAL_SERVICE_ERROR = 14 -INVALID_ARGUMENT = 15 -UNKNOWN = 16 -LOW = 0 -MEDIUM = 1 -HIGH = 2 -CRITICAL = 3 -LOGGING = 0 -POSITION = 1 -SENSOR = 2 -LINK = 3 -DEPLOYMENT = 0 -MTS = 1 - - -_REQUESTHEADER = DESCRIPTOR.message_types_by_name['RequestHeader'] -_REQUESTHEADER_METADATAENTRY = _REQUESTHEADER.nested_types_by_name['MetadataEntry'] -_RESPONSEHEADER = DESCRIPTOR.message_types_by_name['ResponseHeader'] -_RESPONSEHEADER_METADATAENTRY = _RESPONSEHEADER.nested_types_by_name['MetadataEntry'] -_HEARTBEATPULSE = DESCRIPTOR.message_types_by_name['HeartBeatPulse'] -_DIRECTTOAPP = DESCRIPTOR.message_types_by_name['DirectToApp'] -_CACHEITEM = DESCRIPTOR.message_types_by_name['CacheItem'] -_HEALTHCHECKREQUEST = DESCRIPTOR.message_types_by_name['HealthCheckRequest'] -_HEALTHCHECKRESPONSE = DESCRIPTOR.message_types_by_name['HealthCheckResponse'] -_PLUGINHEALTHCHECKREQUEST = DESCRIPTOR.message_types_by_name['PluginHealthCheckRequest'] -_PLUGINHEALTHCHECKRESPONSE = DESCRIPTOR.message_types_by_name['PluginHealthCheckResponse'] -_PLUGINHEALTHCHECKMULTIRESPONSE = DESCRIPTOR.message_types_by_name['PluginHealthCheckMultiResponse'] -_PLUGINCONFIGURATIONREQUEST = DESCRIPTOR.message_types_by_name['PluginConfigurationRequest'] -_PLUGINCONFIGURATIONRESPONSE = DESCRIPTOR.message_types_by_name['PluginConfigurationResponse'] -_PLUGINCONFIGURATIONRESPONSE_PLUGINCONFIG = _PLUGINCONFIGURATIONRESPONSE.nested_types_by_name['PluginConfig'] -_TELEMETRYMETRIC = DESCRIPTOR.message_types_by_name['TelemetryMetric'] -_TELEMETRYMULTIMETRIC = DESCRIPTOR.message_types_by_name['TelemetryMultiMetric'] -_TELEMETRYMETRICRESPONSE = DESCRIPTOR.message_types_by_name['TelemetryMetricResponse'] -_TELEMETRYMULTIMETRICRESPONSE = DESCRIPTOR.message_types_by_name['TelemetryMultiMetricResponse'] -_LOGMESSAGE = DESCRIPTOR.message_types_by_name['LogMessage'] -_LOGMESSAGERESPONSE = DESCRIPTOR.message_types_by_name['LogMessageResponse'] -_LOGMESSAGE_LOG_LEVEL = _LOGMESSAGE.enum_types_by_name['LOG_LEVEL'] -RequestHeader = _reflection.GeneratedProtocolMessageType('RequestHeader', (_message.Message,), { - - 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { - 'DESCRIPTOR' : _REQUESTHEADER_METADATAENTRY, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader.MetadataEntry) - }) - , - 'DESCRIPTOR' : _REQUESTHEADER, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader) - }) -_sym_db.RegisterMessage(RequestHeader) -_sym_db.RegisterMessage(RequestHeader.MetadataEntry) - -ResponseHeader = _reflection.GeneratedProtocolMessageType('ResponseHeader', (_message.Message,), { - - 'MetadataEntry' : _reflection.GeneratedProtocolMessageType('MetadataEntry', (_message.Message,), { - 'DESCRIPTOR' : _RESPONSEHEADER_METADATAENTRY, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader.MetadataEntry) - }) - , - 'DESCRIPTOR' : _RESPONSEHEADER, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader) - }) -_sym_db.RegisterMessage(ResponseHeader) -_sym_db.RegisterMessage(ResponseHeader.MetadataEntry) - -HeartBeatPulse = _reflection.GeneratedProtocolMessageType('HeartBeatPulse', (_message.Message,), { - 'DESCRIPTOR' : _HEARTBEATPULSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.HeartBeatPulse) - }) -_sym_db.RegisterMessage(HeartBeatPulse) - -DirectToApp = _reflection.GeneratedProtocolMessageType('DirectToApp', (_message.Message,), { - 'DESCRIPTOR' : _DIRECTTOAPP, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.DirectToApp) - }) -_sym_db.RegisterMessage(DirectToApp) - -CacheItem = _reflection.GeneratedProtocolMessageType('CacheItem', (_message.Message,), { - 'DESCRIPTOR' : _CACHEITEM, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.CacheItem) - }) -_sym_db.RegisterMessage(CacheItem) - -HealthCheckRequest = _reflection.GeneratedProtocolMessageType('HealthCheckRequest', (_message.Message,), { - 'DESCRIPTOR' : _HEALTHCHECKREQUEST, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.HealthCheckRequest) - }) -_sym_db.RegisterMessage(HealthCheckRequest) - -HealthCheckResponse = _reflection.GeneratedProtocolMessageType('HealthCheckResponse', (_message.Message,), { - 'DESCRIPTOR' : _HEALTHCHECKRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.HealthCheckResponse) - }) -_sym_db.RegisterMessage(HealthCheckResponse) - -PluginHealthCheckRequest = _reflection.GeneratedProtocolMessageType('PluginHealthCheckRequest', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINHEALTHCHECKREQUEST, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginHealthCheckRequest) - }) -_sym_db.RegisterMessage(PluginHealthCheckRequest) - -PluginHealthCheckResponse = _reflection.GeneratedProtocolMessageType('PluginHealthCheckResponse', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINHEALTHCHECKRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginHealthCheckResponse) - }) -_sym_db.RegisterMessage(PluginHealthCheckResponse) - -PluginHealthCheckMultiResponse = _reflection.GeneratedProtocolMessageType('PluginHealthCheckMultiResponse', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINHEALTHCHECKMULTIRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginHealthCheckMultiResponse) - }) -_sym_db.RegisterMessage(PluginHealthCheckMultiResponse) - -PluginConfigurationRequest = _reflection.GeneratedProtocolMessageType('PluginConfigurationRequest', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINCONFIGURATIONREQUEST, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginConfigurationRequest) - }) -_sym_db.RegisterMessage(PluginConfigurationRequest) - -PluginConfigurationResponse = _reflection.GeneratedProtocolMessageType('PluginConfigurationResponse', (_message.Message,), { - - 'PluginConfig' : _reflection.GeneratedProtocolMessageType('PluginConfig', (_message.Message,), { - 'DESCRIPTOR' : _PLUGINCONFIGURATIONRESPONSE_PLUGINCONFIG, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginConfigurationResponse.PluginConfig) - }) - , - 'DESCRIPTOR' : _PLUGINCONFIGURATIONRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.PluginConfigurationResponse) - }) -_sym_db.RegisterMessage(PluginConfigurationResponse) -_sym_db.RegisterMessage(PluginConfigurationResponse.PluginConfig) - -TelemetryMetric = _reflection.GeneratedProtocolMessageType('TelemetryMetric', (_message.Message,), { - 'DESCRIPTOR' : _TELEMETRYMETRIC, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.TelemetryMetric) - }) -_sym_db.RegisterMessage(TelemetryMetric) - -TelemetryMultiMetric = _reflection.GeneratedProtocolMessageType('TelemetryMultiMetric', (_message.Message,), { - 'DESCRIPTOR' : _TELEMETRYMULTIMETRIC, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.TelemetryMultiMetric) - }) -_sym_db.RegisterMessage(TelemetryMultiMetric) - -TelemetryMetricResponse = _reflection.GeneratedProtocolMessageType('TelemetryMetricResponse', (_message.Message,), { - 'DESCRIPTOR' : _TELEMETRYMETRICRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.TelemetryMetricResponse) - }) -_sym_db.RegisterMessage(TelemetryMetricResponse) - -TelemetryMultiMetricResponse = _reflection.GeneratedProtocolMessageType('TelemetryMultiMetricResponse', (_message.Message,), { - 'DESCRIPTOR' : _TELEMETRYMULTIMETRICRESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.TelemetryMultiMetricResponse) - }) -_sym_db.RegisterMessage(TelemetryMultiMetricResponse) - -LogMessage = _reflection.GeneratedProtocolMessageType('LogMessage', (_message.Message,), { - 'DESCRIPTOR' : _LOGMESSAGE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.LogMessage) - }) -_sym_db.RegisterMessage(LogMessage) - -LogMessageResponse = _reflection.GeneratedProtocolMessageType('LogMessageResponse', (_message.Message,), { - 'DESCRIPTOR' : _LOGMESSAGERESPONSE, - '__module__' : 'spacefx.common.Common_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.Common.LogMessageResponse) - }) -_sym_db.RegisterMessage(LogMessageResponse) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\252\002-Microsoft.Azure.SpaceFx.MessageFormats.Common' - _REQUESTHEADER_METADATAENTRY._options = None - _REQUESTHEADER_METADATAENTRY._serialized_options = b'8\001' - _RESPONSEHEADER_METADATAENTRY._options = None - _RESPONSEHEADER_METADATAENTRY._serialized_options = b'8\001' - _TOPICS._serialized_start=4140 - _TOPICS._serialized_end=4169 - _STATUSCODES._serialized_start=4172 - _STATUSCODES._serialized_end=4473 - _PRIORITY._serialized_start=4475 - _PRIORITY._serialized_end=4530 - _HOSTSERVICES._serialized_start=4532 - _HOSTSERVICES._serialized_end=4595 - _PLATFORMSERVICES._serialized_start=4597 - _PLATFORMSERVICES._serialized_end=4640 - _REQUESTHEADER._serialized_start=171 - _REQUESTHEADER._serialized_end=387 - _REQUESTHEADER_METADATAENTRY._serialized_start=340 - _REQUESTHEADER_METADATAENTRY._serialized_end=387 - _RESPONSEHEADER._serialized_start=390 - _RESPONSEHEADER._serialized_end=701 - _RESPONSEHEADER_METADATAENTRY._serialized_start=340 - _RESPONSEHEADER_METADATAENTRY._serialized_end=387 - _HEARTBEATPULSE._serialized_start=704 - _HEARTBEATPULSE._serialized_end=973 - _DIRECTTOAPP._serialized_start=976 - _DIRECTTOAPP._serialized_end=1157 - _CACHEITEM._serialized_start=1160 - _CACHEITEM._serialized_end=1408 - _HEALTHCHECKREQUEST._serialized_start=1410 - _HEALTHCHECKREQUEST._serialized_end=1515 - _HEALTHCHECKRESPONSE._serialized_start=1517 - _HEALTHCHECKRESPONSE._serialized_end=1625 - _PLUGINHEALTHCHECKREQUEST._serialized_start=1627 - _PLUGINHEALTHCHECKREQUEST._serialized_end=1738 - _PLUGINHEALTHCHECKRESPONSE._serialized_start=1740 - _PLUGINHEALTHCHECKRESPONSE._serialized_end=1854 - _PLUGINHEALTHCHECKMULTIRESPONSE._serialized_start=1857 - _PLUGINHEALTHCHECKMULTIRESPONSE._serialized_end=2086 - _PLUGINCONFIGURATIONREQUEST._serialized_start=2088 - _PLUGINCONFIGURATIONREQUEST._serialized_end=2201 - _PLUGINCONFIGURATIONRESPONSE._serialized_start=2204 - _PLUGINCONFIGURATIONRESPONSE._serialized_end=2648 - _PLUGINCONFIGURATIONRESPONSE_PLUGINCONFIG._serialized_start=2429 - _PLUGINCONFIGURATIONRESPONSE_PLUGINCONFIG._serialized_end=2648 - _TELEMETRYMETRIC._serialized_start=2651 - _TELEMETRYMETRIC._serialized_end=2871 - _TELEMETRYMULTIMETRIC._serialized_start=2874 - _TELEMETRYMULTIMETRIC._serialized_end=3071 - _TELEMETRYMETRICRESPONSE._serialized_start=3073 - _TELEMETRYMETRICRESPONSE._serialized_end=3185 - _TELEMETRYMULTIMETRICRESPONSE._serialized_start=3187 - _TELEMETRYMULTIMETRICRESPONSE._serialized_end=3304 - _LOGMESSAGE._serialized_start=3307 - _LOGMESSAGE._serialized_end=4029 - _LOGMESSAGE_LOG_LEVEL._serialized_start=3923 - _LOGMESSAGE_LOG_LEVEL._serialized_end=4029 - _LOGMESSAGERESPONSE._serialized_start=4031 - _LOGMESSAGERESPONSE._serialized_end=4138 -# @@protoc_insertion_point(module_scope) diff --git a/spacefx/common/Common_pb2_grpc.py b/spacefx/common/Common_pb2_grpc.py deleted file mode 100644 index 2daafff..0000000 --- a/spacefx/common/Common_pb2_grpc.py +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - diff --git a/spacefx/common/__init__.py b/spacefx/common/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/spacefx/deployment/Deployment_pb2.py b/spacefx/deployment/Deployment_pb2.py deleted file mode 100644 index 919a980..0000000 --- a/spacefx/deployment/Deployment_pb2.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: spacefx/deployment/Deployment.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from spacefx.common import Common_pb2 as spacefx_dot_common_dot_Common__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n#spacefx/deployment/Deployment.proto\x12\x42Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment\x1a\x1bspacefx/common/Common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/duration.proto\"\xc2\x0e\n\rDeployRequest\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12\x0f\n\x07\x61ppName\x18\x02 \x01(\t\x12\x11\n\tnameSpace\x18\x03 \x01(\t\x12\x15\n\rappGroupLabel\x18\x04 \x01(\t\x12\x1a\n\x12\x63ustomerTrackingId\x18\x05 \x01(\t\x12\x10\n\x08schedule\x18\x06 \x01(\t\x12-\n\tstartTime\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\x0bmaxDuration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x18\n\x10yamlFileContents\x18\t \x01(\t\x12 \n\x18\x63ontainerInjectionTarget\x18\n \x01(\t\x12u\n\x0c\x64\x65ployAction\x18\x0b \x01(\x0e\x32_.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.DeployActions\x12I\n\x08priority\x18\x0c \x01(\x0e\x32\x37.Microsoft.Azure.SpaceFx.MessageFormats.Common.Priority\x12~\n\x10\x61ppContextString\x18\r \x01(\x0b\x32\x62.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContextStringH\x00\x12z\n\x0e\x61ppContextFile\x18\x0e \x01(\x0b\x32`.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContextFileH\x00\x12t\n\x0egpuRequirement\x18\x0f \x01(\x0e\x32\\.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.GpuOptions\x12~\n\x11\x61ppContainerImage\x18\x10 \x01(\x0b\x32\x63.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerImage\x12~\n\x11\x61ppContainerBuild\x18\x11 \x01(\x0b\x32\x63.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerBuild\x1a&\n\x10\x41ppContextString\x12\x12\n\nappContext\x18\x01 \x01(\t\x1a\x34\n\x0e\x41ppContextFile\x12\x10\n\x08\x66ileName\x18\x01 \x01(\t\x12\x10\n\x08required\x18\x02 \x01(\x08\x1a\x63\n\x11\x41ppContainerImage\x12\x17\n\x0ftarballFileName\x18\x01 \x01(\t\x12\x1d\n\x15\x64\x65stinationRepository\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65stinationTag\x18\x03 \x01(\t\x1a\xa7\x02\n\x11\x41ppContainerBuild\x12\x12\n\ndockerFile\x18\x01 \x01(\t\x12\x1d\n\x15\x64\x65stinationRepository\x18\x02 \x01(\t\x12\x16\n\x0e\x64\x65stinationTag\x18\x03 \x01(\t\x12\x8f\x01\n\x0e\x62uildArguments\x18\x04 \x03(\x0b\x32w.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerBuild.BuildArgumentsEntry\x1a\x35\n\x13\x42uildArgumentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x01\n\rDeployActions\x12\t\n\x05\x41PPLY\x10\x00\x12\n\n\x06\x43REATE\x10\x01\x12\n\n\x06\x44\x45LETE\x10\x02\x12\x16\n\x12LOAD_IMAGE_TARBALL\x10\x03\x12\x0f\n\x0b\x42UILD_IMAGE\x10\x04\x12\x16\n\x12RESTART_DEPLOYMENT\x10\x05\x12\x0f\n\x0bUPLINK_FILE\x10\x06\"\"\n\nGpuOptions\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06NVIDIA\x10\x01\x42\x0c\n\nappContext\"\xd1\x01\n\x0e\x44\x65ployResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12h\n\rdeployRequest\x18\x02 \x01(\x0b\x32Q.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest\"\xb5\x01\n\x14ScheduledDeployments\x12\x32\n\x0e\x64\x65ploymentTime\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12i\n\rscheduleQueue\x18\x02 \x03(\x0b\x32R.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployResponse\"\x85\x01\n\x18\x44\x65ployRequestsCollection\x12i\n\x0e\x64\x65ployRequests\x18\x01 \x03(\x0b\x32Q.Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequestBE\xaa\x02\x42Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deploymentb\x06proto3') - - - -_DEPLOYREQUEST = DESCRIPTOR.message_types_by_name['DeployRequest'] -_DEPLOYREQUEST_APPCONTEXTSTRING = _DEPLOYREQUEST.nested_types_by_name['AppContextString'] -_DEPLOYREQUEST_APPCONTEXTFILE = _DEPLOYREQUEST.nested_types_by_name['AppContextFile'] -_DEPLOYREQUEST_APPCONTAINERIMAGE = _DEPLOYREQUEST.nested_types_by_name['AppContainerImage'] -_DEPLOYREQUEST_APPCONTAINERBUILD = _DEPLOYREQUEST.nested_types_by_name['AppContainerBuild'] -_DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY = _DEPLOYREQUEST_APPCONTAINERBUILD.nested_types_by_name['BuildArgumentsEntry'] -_DEPLOYRESPONSE = DESCRIPTOR.message_types_by_name['DeployResponse'] -_SCHEDULEDDEPLOYMENTS = DESCRIPTOR.message_types_by_name['ScheduledDeployments'] -_DEPLOYREQUESTSCOLLECTION = DESCRIPTOR.message_types_by_name['DeployRequestsCollection'] -_DEPLOYREQUEST_DEPLOYACTIONS = _DEPLOYREQUEST.enum_types_by_name['DeployActions'] -_DEPLOYREQUEST_GPUOPTIONS = _DEPLOYREQUEST.enum_types_by_name['GpuOptions'] -DeployRequest = _reflection.GeneratedProtocolMessageType('DeployRequest', (_message.Message,), { - - 'AppContextString' : _reflection.GeneratedProtocolMessageType('AppContextString', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYREQUEST_APPCONTEXTSTRING, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContextString) - }) - , - - 'AppContextFile' : _reflection.GeneratedProtocolMessageType('AppContextFile', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYREQUEST_APPCONTEXTFILE, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContextFile) - }) - , - - 'AppContainerImage' : _reflection.GeneratedProtocolMessageType('AppContainerImage', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYREQUEST_APPCONTAINERIMAGE, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerImage) - }) - , - - 'AppContainerBuild' : _reflection.GeneratedProtocolMessageType('AppContainerBuild', (_message.Message,), { - - 'BuildArgumentsEntry' : _reflection.GeneratedProtocolMessageType('BuildArgumentsEntry', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerBuild.BuildArgumentsEntry) - }) - , - 'DESCRIPTOR' : _DEPLOYREQUEST_APPCONTAINERBUILD, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest.AppContainerBuild) - }) - , - 'DESCRIPTOR' : _DEPLOYREQUEST, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequest) - }) -_sym_db.RegisterMessage(DeployRequest) -_sym_db.RegisterMessage(DeployRequest.AppContextString) -_sym_db.RegisterMessage(DeployRequest.AppContextFile) -_sym_db.RegisterMessage(DeployRequest.AppContainerImage) -_sym_db.RegisterMessage(DeployRequest.AppContainerBuild) -_sym_db.RegisterMessage(DeployRequest.AppContainerBuild.BuildArgumentsEntry) - -DeployResponse = _reflection.GeneratedProtocolMessageType('DeployResponse', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYRESPONSE, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployResponse) - }) -_sym_db.RegisterMessage(DeployResponse) - -ScheduledDeployments = _reflection.GeneratedProtocolMessageType('ScheduledDeployments', (_message.Message,), { - 'DESCRIPTOR' : _SCHEDULEDDEPLOYMENTS, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.ScheduledDeployments) - }) -_sym_db.RegisterMessage(ScheduledDeployments) - -DeployRequestsCollection = _reflection.GeneratedProtocolMessageType('DeployRequestsCollection', (_message.Message,), { - 'DESCRIPTOR' : _DEPLOYREQUESTSCOLLECTION, - '__module__' : 'spacefx.deployment.Deployment_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment.DeployRequestsCollection) - }) -_sym_db.RegisterMessage(DeployRequestsCollection) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\252\002BMicrosoft.Azure.SpaceFx.MessageFormats.PlatformServices.Deployment' - _DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY._options = None - _DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY._serialized_options = b'8\001' - _DEPLOYREQUEST._serialized_start=202 - _DEPLOYREQUEST._serialized_end=2060 - _DEPLOYREQUEST_APPCONTEXTSTRING._serialized_start=1384 - _DEPLOYREQUEST_APPCONTEXTSTRING._serialized_end=1422 - _DEPLOYREQUEST_APPCONTEXTFILE._serialized_start=1424 - _DEPLOYREQUEST_APPCONTEXTFILE._serialized_end=1476 - _DEPLOYREQUEST_APPCONTAINERIMAGE._serialized_start=1478 - _DEPLOYREQUEST_APPCONTAINERIMAGE._serialized_end=1577 - _DEPLOYREQUEST_APPCONTAINERBUILD._serialized_start=1580 - _DEPLOYREQUEST_APPCONTAINERBUILD._serialized_end=1875 - _DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY._serialized_start=1822 - _DEPLOYREQUEST_APPCONTAINERBUILD_BUILDARGUMENTSENTRY._serialized_end=1875 - _DEPLOYREQUEST_DEPLOYACTIONS._serialized_start=1878 - _DEPLOYREQUEST_DEPLOYACTIONS._serialized_end=2010 - _DEPLOYREQUEST_GPUOPTIONS._serialized_start=2012 - _DEPLOYREQUEST_GPUOPTIONS._serialized_end=2046 - _DEPLOYRESPONSE._serialized_start=2063 - _DEPLOYRESPONSE._serialized_end=2272 - _SCHEDULEDDEPLOYMENTS._serialized_start=2275 - _SCHEDULEDDEPLOYMENTS._serialized_end=2456 - _DEPLOYREQUESTSCOLLECTION._serialized_start=2459 - _DEPLOYREQUESTSCOLLECTION._serialized_end=2592 -# @@protoc_insertion_point(module_scope) diff --git a/spacefx/deployment/Deployment_pb2_grpc.py b/spacefx/deployment/Deployment_pb2_grpc.py deleted file mode 100644 index 2daafff..0000000 --- a/spacefx/deployment/Deployment_pb2_grpc.py +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - diff --git a/spacefx/deployment/__init__.py b/spacefx/deployment/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/spacefx/link/Link_pb2.py b/spacefx/link/Link_pb2.py deleted file mode 100644 index fdcb7a2..0000000 --- a/spacefx/link/Link_pb2.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: spacefx/link/Link.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from spacefx.common import Common_pb2 as spacefx_dot_common_dot_Common__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17spacefx/link/Link.proto\x12\x38Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link\x1a\x1bspacefx/common/Common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x80\x04\n\x0bLinkRequest\x12S\n\rrequestHeader\x18\x01 \x01(\x0b\x32<.Microsoft.Azure.SpaceFx.MessageFormats.Common.RequestHeader\x12`\n\x08linkType\x18\x02 \x01(\x0e\x32N.Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link.LinkRequest.LinkType\x12I\n\x08priority\x18\x03 \x01(\x0e\x32\x37.Microsoft.Azure.SpaceFx.MessageFormats.Common.Priority\x12\x10\n\x08\x66ileName\x18\x04 \x01(\t\x12\x14\n\x0csubdirectory\x18\x05 \x01(\t\x12\x18\n\x10\x64\x65stinationAppId\x18\x06 \x01(\t\x12\x11\n\toverwrite\x18\x07 \x01(\x08\x12\x17\n\x0fleaveSourceFile\x18\x08 \x01(\x08\x12\x32\n\x0e\x65xpirationTime\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"M\n\x08LinkType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06UPLINK\x10\x01\x12\r\n\tCROSSLINK\x10\x02\x12\x0b\n\x07\x41PP2APP\x10\x03\x12\x0c\n\x08\x44OWNLINK\x10\x04\"\x8c\x02\n\x0cLinkResponse\x12U\n\x0eresponseHeader\x18\x01 \x01(\x0b\x32=.Microsoft.Azure.SpaceFx.MessageFormats.Common.ResponseHeader\x12Z\n\x0blinkRequest\x18\x02 \x01(\x0b\x32\x45.Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link.LinkRequest\x12\x12\n\nfileSizeKB\x18\x03 \x01(\x03\x12\x35\n\x11linkProcessedTime\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB;\xaa\x02\x38Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Linkb\x06proto3') - - - -_LINKREQUEST = DESCRIPTOR.message_types_by_name['LinkRequest'] -_LINKRESPONSE = DESCRIPTOR.message_types_by_name['LinkResponse'] -_LINKREQUEST_LINKTYPE = _LINKREQUEST.enum_types_by_name['LinkType'] -LinkRequest = _reflection.GeneratedProtocolMessageType('LinkRequest', (_message.Message,), { - 'DESCRIPTOR' : _LINKREQUEST, - '__module__' : 'spacefx.link.Link_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link.LinkRequest) - }) -_sym_db.RegisterMessage(LinkRequest) - -LinkResponse = _reflection.GeneratedProtocolMessageType('LinkResponse', (_message.Message,), { - 'DESCRIPTOR' : _LINKRESPONSE, - '__module__' : 'spacefx.link.Link_pb2' - # @@protoc_insertion_point(class_scope:Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link.LinkResponse) - }) -_sym_db.RegisterMessage(LinkResponse) - -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'\252\0028Microsoft.Azure.SpaceFx.MessageFormats.HostServices.Link' - _LINKREQUEST._serialized_start=148 - _LINKREQUEST._serialized_end=660 - _LINKREQUEST_LINKTYPE._serialized_start=583 - _LINKREQUEST_LINKTYPE._serialized_end=660 - _LINKRESPONSE._serialized_start=663 - _LINKRESPONSE._serialized_end=931 -# @@protoc_insertion_point(module_scope) diff --git a/spacefx/link/Link_pb2_grpc.py b/spacefx/link/Link_pb2_grpc.py deleted file mode 100644 index 2daafff..0000000 --- a/spacefx/link/Link_pb2_grpc.py +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! -"""Client and server classes corresponding to protobuf-defined services.""" -import grpc - diff --git a/spacefx/link/__init__.py b/spacefx/link/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/spacefx/position/Position_pb2.py b/spacefx/position/Position_pb2.py deleted file mode 100644 index 5d750a1..0000000 --- a/spacefx/position/Position_pb2.py +++ /dev/null @@ -1,100 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: spacefx/position/Position.proto -"""Generated protocol buffer code.""" -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import message as _message -from google.protobuf import reflection as _reflection -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from spacefx.common import Common_pb2 as spacefx_dot_common_dot_Common__pb2 -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fspacefx/position/Position.proto\x12 + true + true Microsoft.Azure.SpaceSDK.Client Microsoft Azure Space SDK;Microsoft;Azure;Space; @@ -25,9 +27,14 @@ - - - + + + + + + + + diff --git a/test/debugClient_python/debugClient.py b/test/debugClient_python/debugClient.py index 3a74b19..3cb8294 100644 --- a/test/debugClient_python/debugClient.py +++ b/test/debugClient_python/debugClient.py @@ -59,7 +59,8 @@ def link_service(): logger.info("Root: %s" % xfer_directory['root']) logger.info("Sending file to app...") - link_response = spacefx.link.send_file_to_app("sdk-dotnet", f"/workspaces/sdk-dotnet/test/sampleData/astronaut.jpg", overwrite_destination_file=True) + testfile = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "sampleData", "astronaut.jpg") + link_response = spacefx.link.send_file_to_app("spacesdk-client", testfile, overwrite_destination_file=True) logger.info(f"Result: {StatusCodes.Name(link_response.responseHeader.status)}") logger.info("----LINK SERVICE: END-----") diff --git a/test/integrationTests_python/integrationTest.py b/test/integrationTests_python/integrationTest.py index f854a89..3620976 100644 --- a/test/integrationTests_python/integrationTest.py +++ b/test/integrationTests_python/integrationTest.py @@ -67,7 +67,8 @@ def link_service(): logger.info("Root: %s" % xfer_directory['root']) logger.info("Sending file to app...") - link_response = spacefx.link.send_file_to_app("sdk-dotnet", f"/workspaces/sdk-dotnet/test/sampleData/astronaut.jpg", overwrite_destination_file=True) + testfile = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "sampleData", "astronaut.jpg") + link_response = spacefx.link.send_file_to_app("spacesdk-client", testfile, overwrite_destination_file=True) logger.info(f"Result: {StatusCodes.Name(link_response.responseHeader.status)}") logger.info("----LINK SERVICE: END-----")