@@ -74,33 +74,24 @@ def sdv_install_cmd(credentials):
7474 )
7575
7676
77- def create_credentials_file (filepath , credentials = None ):
78- """Create a credentials file.
79-
80- Args:
81- filepath (str): The path to the credentials file.
82- credentials (dict):
83- The credentials to write to the file. If None, credential will be defined
84- based on environment variables. Defaults to None.
85- """
86- if credentials is None :
87- gcp_json = os .getenv ('GCP_SERVICE_ACCOUNT_JSON' )
88-
89- credentials = {
90- 'aws' : {
91- 'aws_access_key_id' : os .getenv ('AWS_ACCESS_KEY_ID' ),
92- 'aws_secret_access_key' : os .getenv ('AWS_SECRET_ACCESS_KEY' ),
93- },
94- 'gcp' : {
95- ** json .loads (gcp_json ),
96- 'gcp_project' : 'sdgym-337614' ,
97- 'gcp_zone' : 'us-central1-a' ,
98- },
99- 'sdv' : {
100- 'username' : os .getenv ('SDV_ENTERPRISE_USERNAME' ),
101- 'license_key' : os .getenv ('SDV_ENTERPRISE_LICENSE_KEY' ),
102- },
103- }
77+ def create_credentials_file ():
78+ """Create a credentials file."""
79+ gcp_json = os .getenv ('GCP_SERVICE_ACCOUNT_JSON' )
80+ credentials = {
81+ 'aws' : {
82+ 'aws_access_key_id' : os .getenv ('AWS_ACCESS_KEY_ID' ),
83+ 'aws_secret_access_key' : os .getenv ('AWS_SECRET_ACCESS_KEY' ),
84+ },
85+ 'gcp' : {
86+ ** json .loads (gcp_json ),
87+ 'gcp_project' : 'sdgym-337614' ,
88+ 'gcp_zone' : 'us-central1-a' ,
89+ },
90+ 'sdv' : {
91+ 'username' : os .getenv ('SDV_ENTERPRISE_USERNAME' ),
92+ 'license_key' : os .getenv ('SDV_ENTERPRISE_LICENSE_KEY' ),
93+ },
94+ }
10495
10596 tmp_file = NamedTemporaryFile (mode = 'w+' , delete = False , suffix = '.json' )
10697 json .dump (credentials , tmp_file )
0 commit comments