Skip to content

Commit 601788e

Browse files
author
Thibaud Baas
committed
FM: Review feedback on VirtualNetworks
1 parent c9c631c commit 601788e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dataikuapi/fm/virtualnetworks.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ def with_auto_create_security_groups(self):
4545
self.data["awsAutoCreateSecurityGroups"] = True
4646
return self
4747

48-
def with_aws_security_groups(self, aws_security_groups):
48+
def with_aws_security_groups(self, *aws_security_groups):
4949
"""
5050
Use pre-created AWS Security Groups
5151
52-
:param list aws_security_groups: A list of up to 5 security group ids to assign to the instances created in this virtual network.
52+
:param str *aws_security_groups: Up to 5 security group ids to assign to the instances created in this virtual network.
5353
"""
5454
self.data["awsAutoCreateSecurityGroups"] = False
5555
self.data["awsSecurityGroups"] = aws_security_groups
@@ -149,7 +149,7 @@ def set_fleet_management(
149149
self.vn_data["managedNodesDirectory"] = enable
150150
self.vn_data["eventServerNodeLabel"] = event_server
151151
self.vn_data["nodesDirectoryDeployerMode"] = deployer_management
152-
self.save()
152+
return self
153153

154154
def set_https_strategy(self, https_strategy):
155155
"""
@@ -158,7 +158,7 @@ def set_https_strategy(self, https_strategy):
158158
:param object: a :class:`dataikuapi.fm.virtualnetworks.FMHTTPSStrategy`
159159
"""
160160
self.vn_data.update(https_strategy)
161-
self.save()
161+
return self
162162

163163

164164
class FMAWSVirtualNetwork(FMVirtualNetwork):
@@ -183,7 +183,7 @@ def set_dns_strategy(
183183
else:
184184
self.vn_data["dnsStrategy"] = "NONE"
185185

186-
self.save()
186+
return self
187187

188188

189189
class FMAzureVirtualNetwork(FMVirtualNetwork):
@@ -201,7 +201,7 @@ def set_dns_strategy(self, assign_domain_name, azure_dns_zone_id=None):
201201
else:
202202
self.vn_data["dnsStrategy"] = "NONE"
203203

204-
self.save()
204+
return self
205205

206206

207207
class FMHTTPSStrategy(dict):

0 commit comments

Comments
 (0)