summaryrefslogtreecommitdiffstats
path: root/ms/py-executor/resource_resolution
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 15:44:01 -0400
commitdaab14bd058de198c80b71d63e108fd788b7f5ee (patch)
tree252cfdef5b2e1500e5bd152f3f5c52602b6b0deb /ms/py-executor/resource_resolution
parent82e396d6917519468376d177dd6a2710e84fa23a (diff)
Revert "Renaming Files having BluePrint to have Blueprint"
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/resource_resolution')
-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
3 files changed, 12 insertions, 12 deletions
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
"""