Skip to content

Commit

Permalink
update gke create vng
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrutha497 committed Jun 30, 2024
1 parent b472e46 commit 0134b80
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spotinst_sdk2/clients/ocean/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2108,12 +2108,13 @@ def get_aggregated_summary_costs(self, ocean_id: str, aggregated_cluster_costs:

return formatted_response["response"]["items"][0]

def create_virtual_node_group(self, vng: gcp_ocean.VirtualNodeGroup):
def create_virtual_node_group(self, vng: gcp_ocean.VirtualNodeGroup, initial_nodes: int = None):
"""
Create a virtual node group.
# Arguments
vng (VirtualNodeGroup): VirtualNodeGroup Object
initial_nodes: When set to an integer greater than 0, a corresponding number of nodes will be launched from the virtual node group created.
# Returns
(Object): Ocean Launch Spec response
Expand All @@ -2128,10 +2129,13 @@ def create_virtual_node_group(self, vng: gcp_ocean.VirtualNodeGroup):

body_json = json.dumps(formatted_missing_dict)

response = self.send_post(
query_params = dict(initialNodes=initial_nodes)

response = self.send_post_with_params(
body=body_json,
url=self.__base_ocean_launchspec_url,
entity_name='ocean_gcp_vng')
entity_name='ocean_gcp_vng',
user_query_params=query_params)

formatted_response = self.convert_json(response,
self.camel_to_underscore)
Expand Down

0 comments on commit 0134b80

Please sign in to comment.