Skip to content

Commit de920c8

Browse files
nickruhldopry
authored andcommitted
add convet function to vultr/v1_reservedip
1 parent 4a13650 commit de920c8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

vultr/v1_reservedip.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,17 @@ def create(self, dcid, ip_type, params=None):
2020
'ip_type': ip_type
2121
})
2222
return self.request('/v1/reservedip/create', params, 'POST')
23+
24+
def convert(self, subid, ip_address, params=None):
25+
''' /v1/reservedip/convert
26+
POST - account
27+
Convert an existing IP on a subscription to a reserved IP.
28+
Returns the SUBID of the newly created reserved IP.
29+
30+
Link: https://www.vultr.com/api/#reservedip_convert
31+
'''
32+
params = update_params(params, {
33+
'SUBID': subid,
34+
'ip_address': ip_address
35+
})
36+
return self.request('/v1/reservedip/convert', params, 'POST')

0 commit comments

Comments
 (0)