Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 05ffe01

Browse files
authored
Merge pull request #373 from githanwang1/bug/update_apigw_endpoints
Use updated apigw endpoint w/ secure channel
2 parents b513692 + 3306e72 commit 05ffe01

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/test-apps/happy/test-templates/ServiceAccountManager.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
def option():
4040
return options.copy()
4141

42-
apigw_fmt = 'apigw01.weave01.iad02.{tier}.nestlabs.com'
42+
apigw_fmt = 'apigw.{tier}.nestlabs.com'
4343
apigw_siac_fmt = '{siac_name}.unstable.nestlabs.com'
4444

4545

@@ -70,12 +70,14 @@ def _create_gateway_service_stub(self):
7070
if ".unstable" in self.tier:
7171
siac_name = self.tier.split('.')[0]
7272
apigw = apigw_siac_fmt.format(siac_name=siac_name)
73+
channel = grpc.insecure_channel('{}:9953'.format(apigw))
7374
else:
7475
apigw = apigw_fmt.format(tier=self.tier)
75-
76+
port = 443
77+
channel_credentials = grpc.ssl_channel_credentials(None, None, None)
78+
channel = grpc.secure_channel('{}:{}'.format(apigw,port), channel_credentials)
7679
return \
77-
gateway_api_pb2_grpc.GatewayServiceStub(
78-
grpc.insecure_channel('{}:9953'.format(apigw)))
80+
gateway_api_pb2_grpc.GatewayServiceStub(channel)
7981

8082
@property
8183
def account_id(self):

0 commit comments

Comments
 (0)