Skip to content

Commit 0b4dbb9

Browse files
authored
chore(sdk): remove rpc lookups (#75)
1 parent e2ffb75 commit 0b4dbb9

File tree

3 files changed

+3
-47
lines changed

3 files changed

+3
-47
lines changed

staxapp/data/schema.json

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -737,12 +737,6 @@
737737
"fullDomainName": {
738738
"type": "string"
739739
},
740-
"masterAccountId": {
741-
"type": "string"
742-
},
743-
"rootOrgId": {
744-
"$ref": "#\/components\/schemas\/ro-uuidv4"
745-
},
746740
"stage": {
747741
"type": "string"
748742
}
@@ -769,26 +763,6 @@
769763
},
770764
"type": "object"
771765
},
772-
"Pingdom": {
773-
"properties": {
774-
"key": {
775-
"nullable": true,
776-
"type": "string"
777-
}
778-
},
779-
"type": "object"
780-
},
781-
"SNS": {
782-
"properties": {
783-
"event": {
784-
"type": "string"
785-
},
786-
"notify": {
787-
"type": "string"
788-
}
789-
},
790-
"type": "object"
791-
},
792766
"Sentry": {
793767
"properties": {
794768
"dsn": {
@@ -800,17 +774,6 @@
800774
},
801775
"type": "object"
802776
},
803-
"Storage": {
804-
"properties": {
805-
"bucket": {
806-
"type": "string"
807-
},
808-
"region": {
809-
"$ref": "#\/components\/schemas\/AwsRegion"
810-
}
811-
},
812-
"type": "object"
813-
},
814777
"Zone": {
815778
"properties": {
816779
"key": {

staxapp/openapi.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class StaxClient:
1515
_schema = dict()
1616
_initialized = False
1717

18-
def __init__(self, classname, lambda_client=None, force=False):
18+
def __init__(self, classname, force=False):
1919
# Stax feature, eg 'quotas', 'workloads'
2020
if force or not self._operation_map:
2121
_operation_map = dict()
@@ -28,13 +28,7 @@ def __init__(self, classname, lambda_client=None, force=False):
2828
)
2929
self.classname = classname
3030

31-
if lambda_client:
32-
self.lambda_client = lambda_client
33-
self._admin = True
34-
self.arn = f"arn:aws:lambda:{Config.api_config['Juma']['controlplaneRegion']}:{Config.api_config['Juma']['masterAccountId']}:function:{self.classname}-admninrpc-{Config.api_config['Juma']['stage']}-{Config.branch()}"
35-
else:
36-
Config.auth_class = ApiTokenAuth
37-
self._admin = False
31+
Config.auth_class = ApiTokenAuth
3832
self._initialized = True
3933

4034
@classmethod

tests/test_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ def testStaxClient(self):
3232
"""
3333
Test initializing Stax client
3434
"""
35-
client = StaxClient("accounts", lambda_client=True)
35+
client = StaxClient("accounts")
3636
self.assertTrue(client._initialized)
37-
self.assertTrue(client._admin)
3837

3938
def testInvalidStaxClient(self):
4039
"""

0 commit comments

Comments
 (0)