summaryrefslogtreecommitdiffstats
path: root/ms/py-executor
diff options
context:
space:
mode:
Diffstat (limited to 'ms/py-executor')
-rw-r--r--ms/py-executor/blueprints_grpc/__init__.py4
-rw-r--r--ms/py-executor/blueprints_grpc/blueprint_processing_server.py4
-rw-r--r--ms/py-executor/blueprints_grpc/executor_utils.py4
-rw-r--r--ms/py-executor/client.py8
-rw-r--r--ms/py-executor/resource_resolution/README.md12
-rw-r--r--ms/py-executor/resource_resolution/grpc/client.py6
-rw-r--r--ms/py-executor/resource_resolution/resource_resolution.py6
-rw-r--r--ms/py-executor/server.py18
8 files changed, 31 insertions, 31 deletions
diff --git a/ms/py-executor/blueprints_grpc/__init__.py b/ms/py-executor/blueprints_grpc/__init__.py
index 8a2db9e1e..991ddeb0a 100644
--- a/ms/py-executor/blueprints_grpc/__init__.py
+++ b/ms/py-executor/blueprints_grpc/__init__.py
@@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from proto.BluePrintCommon_pb2 import *
-from proto.BluePrintProcessing_pb2 import *
+from proto.BlueprintCommon_pb2 import *
+from proto.BlueprintProcessing_pb2 import *
from .script_executor_configuration import *
from .executor_utils import *
from .blueprint_processing_server import * \ No newline at end of file
diff --git a/ms/py-executor/blueprints_grpc/blueprint_processing_server.py b/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
index 322d34b0b..1d2eab732 100644
--- a/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
+++ b/ms/py-executor/blueprints_grpc/blueprint_processing_server.py
@@ -16,7 +16,7 @@
import logging
from google.protobuf.json_format import MessageToJson
-from proto import BluePrintProcessing_pb2_grpc as BluePrintProcessing_pb2_grpc
+from proto import BlueprintProcessing_pb2_grpc as BlueprintProcessing_pb2_grpc
from .script_executor_configuration import ScriptExecutorConfiguration
from .executor_utils import instance_for_input
@@ -33,7 +33,7 @@ class AbstractScriptFunction:
pass
-class BluePrintProcessingServer(BluePrintProcessing_pb2_grpc.BluePrintProcessingServiceServicer):
+class BlueprintProcessingServer(BlueprintProcessing_pb2_grpc.BlueprintProcessingServiceServicer):
def __init__(self, configuration: ScriptExecutorConfiguration):
self.logger = logging.getLogger(self.__class__.__name__)
diff --git a/ms/py-executor/blueprints_grpc/executor_utils.py b/ms/py-executor/blueprints_grpc/executor_utils.py
index 701958fff..93197112e 100644
--- a/ms/py-executor/blueprints_grpc/executor_utils.py
+++ b/ms/py-executor/blueprints_grpc/executor_utils.py
@@ -24,14 +24,14 @@ import time
from google.protobuf import json_format, struct_pb2
from google.protobuf.timestamp_pb2 import Timestamp
-from proto.BluePrintCommon_pb2 import (
+from proto.BlueprintCommon_pb2 import (
EVENT_COMPONENT_EXECUTED,
EVENT_COMPONENT_NOTIFICATION,
EVENT_COMPONENT_PROCESSING,
EVENT_COMPONENT_TRACE,
Status
)
-from proto.BluePrintProcessing_pb2 import (
+from proto.BlueprintProcessing_pb2 import (
ExecutionServiceInput,
ExecutionServiceOutput,
)
diff --git a/ms/py-executor/client.py b/ms/py-executor/client.py
index 482bcbdd3..bf636a8be 100644
--- a/ms/py-executor/client.py
+++ b/ms/py-executor/client.py
@@ -25,9 +25,9 @@
# limitations under the License.
import grpc
-from proto.BluePrintCommon_pb2 import ActionIdentifiers, CommonHeader
-from proto.BluePrintProcessing_pb2 import ExecutionServiceInput
-from proto.BluePrintProcessing_pb2_grpc import BluePrintProcessingServiceStub
+from proto.BlueprintCommon_pb2 import ActionIdentifiers, CommonHeader
+from proto.BlueprintProcessing_pb2 import ExecutionServiceInput
+from proto.BlueprintProcessing_pb2_grpc import BlueprintProcessingServiceStub
def generate_messages():
@@ -59,7 +59,7 @@ if __name__ == '__main__':
with open('py-executor-chain.pem', 'rb') as f:
creds = grpc.ssl_channel_credentials(f.read())
channel = grpc.secure_channel('localhost:50052', creds)
- stub = BluePrintProcessingServiceStub(channel)
+ stub = BlueprintProcessingServiceStub(channel)
messages = generate_messages()
responses = stub.process(messages)
diff --git a/ms/py-executor/resource_resolution/README.md b/ms/py-executor/resource_resolution/README.md
index 3920338ae..a2edebf98 100644
--- a/ms/py-executor/resource_resolution/README.md
+++ b/ms/py-executor/resource_resolution/README.md
@@ -5,8 +5,8 @@
### Insecure channel
```
-from proto.BluePrintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
-from proto.BluePrintProcessing_pb2_grpc import ExecutionServiceInput
+from proto.BlueprintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
+from proto.BlueprintProcessing_pb2_grpc import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
@@ -43,8 +43,8 @@ if __name__ == "__main__":
### Secure channel
```
-from proto.BluePrintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
-from proto.BluePrintProcessing_pb2_grpc import ExecutionServiceInput
+from proto.BlueprintCommon_pb2_grpc import ActionIdentifiers, CommonHeader
+from proto.BlueprintProcessing_pb2_grpc import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
@@ -82,8 +82,8 @@ if __name__ == "__main__":
### Authorizarion header
```
-from proto.BluePrintCommon_pb2 import ActionIdentifiers, CommonHeader
-from proto.BluePrintProcessing_pb2 import ExecutionServiceInput
+from proto.BlueprintCommon_pb2 import ActionIdentifiers, CommonHeader
+from proto.BlueprintProcessing_pb2 import ExecutionServiceInput
from resource_resolution.grpc.client import Client as ResourceResolutionClient
diff --git a/ms/py-executor/resource_resolution/grpc/client.py b/ms/py-executor/resource_resolution/grpc/client.py
index fee168628..95f59b532 100644
--- a/ms/py-executor/resource_resolution/grpc/client.py
+++ b/ms/py-executor/resource_resolution/grpc/client.py
@@ -23,8 +23,8 @@ from grpc import (
secure_channel,
ssl_channel_credentials,
)
-from proto.BluePrintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
-from proto.BluePrintProcessing_pb2_grpc import BluePrintProcessingServiceStub
+from proto.BlueprintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
+from proto.BlueprintProcessing_pb2_grpc import BlueprintProcessingServiceStub
from .authorization import AuthTokenInterceptor
@@ -69,7 +69,7 @@ class Client:
self.logger.debug(f"Create insecure channel to connect to {server_address}")
if use_header_auth:
self.channel: Channel = intercept_channel(self.channel, AuthTokenInterceptor(header_auth_token))
- self.stub: BluePrintProcessingServiceStub = BluePrintProcessingServiceStub(self.channel)
+ self.stub: BlueprintProcessingServiceStub = BlueprintProcessingServiceStub(self.channel)
def close(self) -> None:
"""Close client session.
diff --git a/ms/py-executor/resource_resolution/resource_resolution.py b/ms/py-executor/resource_resolution/resource_resolution.py
index 3b8c19b74..c5f758563 100644
--- a/ms/py-executor/resource_resolution/resource_resolution.py
+++ b/ms/py-executor/resource_resolution/resource_resolution.py
@@ -23,7 +23,7 @@ from typing import Any, Dict, Generator, Optional, Type
from google.protobuf import json_format
-from proto.BluePrintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
+from proto.BlueprintProcessing_pb2 import ExecutionServiceInput, ExecutionServiceOutput
from .grpc import Client as GrpcClient
from .http import Client as HttpClient
@@ -361,12 +361,12 @@ class ResourceResolution:
It's possible to store/retrieve templates using pair of artifact name and resolution key OR
resource type and resource id. This method checks if valid combination of parameters were used.
-
+
Args:
resolution_key (str, optional): resolutionKey HTTP request parameter value. Defaults to None.
resource_type (str, optional): resourceType HTTP request parameter value. Defaults to None.
resource_id (str, optional): resourceId HTTP request parameter value. Defaults to None.
-
+
Raises:
AttributeError: Invalid combination of parametes used
"""
diff --git a/ms/py-executor/server.py b/ms/py-executor/server.py
index 7f6537011..5df6f9350 100644
--- a/ms/py-executor/server.py
+++ b/ms/py-executor/server.py
@@ -24,10 +24,10 @@ from pathlib import Path, PurePath
import grpc
from manager.servicer import ArtifactManagerServicer
-from proto.BluePrintManagement_pb2_grpc import add_BluePrintManagementServiceServicer_to_server
+from proto.BlueprintManagement_pb2_grpc import add_BlueprintManagementServiceServicer_to_server
-from blueprints_grpc import BluePrintProcessing_pb2_grpc, ScriptExecutorConfiguration
-from blueprints_grpc.blueprint_processing_server import BluePrintProcessingServer
+from blueprints_grpc import BlueprintProcessing_pb2_grpc, ScriptExecutorConfiguration
+from blueprints_grpc.blueprint_processing_server import BlueprintProcessingServer
from blueprints_grpc.request_header_validator_interceptor import RequestHeaderValidatorInterceptor
logger = logging.getLogger("Server")
@@ -56,10 +56,10 @@ def serve(configuration: ScriptExecutorConfiguration):
# create server
server = grpc.server(futures.ThreadPoolExecutor(max_workers=int(maxWorkers)))
- BluePrintProcessing_pb2_grpc.add_BluePrintProcessingServiceServicer_to_server(
- BluePrintProcessingServer(configuration), server
+ BlueprintProcessing_pb2_grpc.add_BlueprintProcessingServiceServicer_to_server(
+ BlueprintProcessingServer(configuration), server
)
- add_BluePrintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
+ add_BlueprintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
# add secure port using credentials
server.add_secure_port('[::]:' + port, server_credentials)
@@ -73,10 +73,10 @@ def serve(configuration: ScriptExecutorConfiguration):
# create server with token authentication interceptors
server = grpc.server(futures.ThreadPoolExecutor(max_workers=int(maxWorkers)),
interceptors=(header_validator,))
- BluePrintProcessing_pb2_grpc.add_BluePrintProcessingServiceServicer_to_server(
- BluePrintProcessingServer(configuration), server
+ BlueprintProcessing_pb2_grpc.add_BlueprintProcessingServiceServicer_to_server(
+ BlueprintProcessingServer(configuration), server
)
- add_BluePrintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
+ add_BlueprintManagementServiceServicer_to_server(ArtifactManagerServicer(), server)
server.add_insecure_port('[::]:' + port)
server.start()