-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlb_globo_create.py
31 lines (25 loc) · 1021 Bytes
/
lb_globo_create.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
from lib.cloudstack import CloudStackAPI
__all__ = [
'LBGloboCreate'
]
class LBGloboCreate(CloudStackAPI):
def run(self, url, apikey, secretkey, name, algorithm, publicport,
privateport, projectid, openfirewall, networkid,
additionalportmap, healthchecktype, healthcheckrequest,
expectedhealthcheck, lbenvironmentid, timeoutrequest):
cs = self.get_client(url, apikey, secretkey, timeout=timeoutrequest)
return cs.createGloboLoadBalancer(
algorithm=algorithm,
name=name,
publicport=publicport,
projectid=projectid,
privateport=privateport,
openfirewall=str(openfirewall),
networkid=networkid,
additionalportmap=additionalportmap,
healthcheckType=healthchecktype,
healthcheckrequest=healthcheckrequest,
expectedhealthcheck=expectedhealthcheck,
lbenvironmentid=str(lbenvironmentid)
)