File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import json
2+ import os
3+
4+ from staxapp .config import Config
5+ from staxapp .openapi import StaxClient
6+ from customscript import get_hostnames
7+ hostname = get_hostnames ()
8+
9+ access_key = os .getenv ("STAX_ACCESS_KEY" )
10+ secret_key = os .getenv ("STAX_SECRET_KEY" )
11+
12+ Config .hostname = hostname ["au1" ]
13+ Config .access_key = access_key
14+ Config .secret_key = secret_key
15+
16+ accounts_au1 = StaxClient ('accounts' )
17+
18+ au1_response = accounts_au1 .CreateAccountType (
19+ Name = "sdk-au1"
20+ )
21+
22+ print (json .dumps (au1_response , indent = 4 , sort_keys = True ))
23+
24+ access_key_2 = os .getenv ("STAX_ACCESS_KEY_2" )
25+ secret_key_2 = os .getenv ("STAX_SECRET_KEY_2" )
26+ config = Config (hostname = hostname ["us1" ], access_key = access_key_2 , secret_key = secret_key_2 )
27+
28+ us1_accounts = StaxClient ('accounts' , config = config )
29+
30+ us1_response = us1_accounts .CreateAccountType (
31+ Name = "sdk-us1"
32+ )
33+ print (json .dumps (us1_response , indent = 4 , sort_keys = True ))
You can’t perform that action at this time.
0 commit comments