summaryrefslogtreecommitdiffstats
path: root/ms/py-executor
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-26 12:00:59 -0400
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-07-28 09:06:26 -0400
commit45263f50896a7021cd17d78ce83b29365cb19c29 (patch)
tree0245881b0c3badd2e72144dc29311f4e7df58e38 /ms/py-executor
parent76cb04c2302c9f8f0395f86d8e8d246fdae0fd28 (diff)
Revert "Renaming Files having BluePrint to have Blueprint"1.1.5
The renaming in CCSDK-3098 caused breaking changes to the grpc api and compile issues for kotlin scripts. Issue-ID: CCSDK-3385 Change-Id: I0d745cb858371678eabcb2284671c1fd76a1ab6d Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
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 991ddeb0a..8a2db9e1e 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 1d2eab732..322d34b0b 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 93197112e..701958fff 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 bf636a8be..482bcbdd3 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 a2edebf98..3920338ae 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 95f59b532..fee168628 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 c5f758563..3b8c19b74 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 5df6f9350..7f6537011 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()