Skip to content

Commit

Permalink
OS-7513. Fixed deploy for new yaml version
Browse files Browse the repository at this point in the history
## Description

Fixed deploy for new yaml version

## Related issue number

OS-7513

## Checklist

* [ ] The pull request title is a good summary of the changes
* [ ] Unit tests for the changes exist
* [ ] New and existing unit tests pass locally
  • Loading branch information
sd-hystax authored Apr 26, 2024
1 parent 9f81c7a commit 62d30d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def edit_cluster_spec_unpause(spec):

def main(input_path, file_type, cluster_id=None):
with open(input_path) as f:
input_dict = yaml.load(f)
input_dict = yaml.safe_load(f)

if file_type == 'pod':
if not cluster_id:
Expand Down
2 changes: 1 addition & 1 deletion optscale-deploy/cluster_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def docker_cl(self):
def get_cluster_info(self):
version_map_data = self.core_api.read_namespaced_config_map(
name=CONFIGMAP_NAME, namespace=NAMESPACE).data
version_map = yaml.load(version_map_data['component_versions.yaml'])
version_map = yaml.safe_load(version_map_data['component_versions.yaml'])
if self.no_urls:
return version_map

Expand Down
8 changes: 4 additions & 4 deletions rest_api/optscale_console/optscale_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import yaml
import sys
import inspect
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import urllib3

from optscale_client.rest_api_client.client_v2 import Client as RestClient
from optscale_client.auth_client.client_v2 import Client as AuthClient
Expand Down Expand Up @@ -200,12 +200,12 @@ def list_commands(self, entity=None):


def yaml2js(input):
loaded = yaml.load(input)
loaded = yaml.safe_load(input)
return json.dumps(loaded)


def yaml2dict(input):
loaded = yaml.load(input)
loaded = yaml.safe_load(input)
return loaded


Expand Down Expand Up @@ -246,7 +246,7 @@ def parse_args():


def main():
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
urllib3.disable_warnings(category=urllib3.exceptions.InsecureRequestWarning)
console = OptscaleConsole('optscale_console.cfg')

if len(sys.argv) == 1:
Expand Down

0 comments on commit 62d30d8

Please sign in to comment.