clc.APIv2.anti_affinity
index
/Users//clc_git/src/clc/APIv2/anti_affinity.py

Anti-affinity related functions.  
 
These Anti-affinity related functions generally align one-for-one with published API calls categorized in the account category
 
API v2 - https://t3n.zendesk.com/forums/21645944-Account
 
Antiaffinity object variables:
 
        antiaffinity.id
        antiaffinity.name
        antiaffinity.location
        antiaffinity.servers

 
Modules
       
clc

 
Classes
       
__builtin__.object
AntiAffinity

 
class AntiAffinity(__builtin__.object)
     Methods defined here:
Delete(self)
Delete policy
 
https://t3n.zendesk.com/entries/45044330-Delete-Anti-Affinity-Policy
 
>>> a = clc.v2.AntiAffinity.GetLocation("WA1")[0]
>>> a.Delete()
Update(self, name)
Change the policy's name.
 
https://t3n.zendesk.com/entries/45066480-Update-Anti-Affinity-Policy
 
*TODO* - currently returning 500 error
__init__(self, id, alias=None, name=None, location=None, servers=None)
Create AntiAffinity object.
 
If parameters are populated then create object location.  
Else if only id is supplied issue a Get Policy call
 
https://t3n.zendesk.com/entries/44658344-Get-Anti-Affinity-Policy
 
>>> clc.v2.AntiAffinity(id="f5b5e523ed8e4604842ec417d5502510")
<clc.APIv2.anti_affinity.AntiAffinity object at 0x104753690>
__str__(self)

Static methods defined here:
Create(name, alias=None, location=None)
Creates a new anti-affinity policy within a given account.
 
https://t3n.zendesk.com/entries/45042770-Create-Anti-Affinity-Policy
 
*TODO* Currently returning 400 error:
clc.APIFailedResponse: Response code 400. . POST https://api.tier3.com/v2/antiAffinityPolicies/BTDI
GetAll(alias=None, location=None)
Gets a list of anti-affinity policies within a given account.
 
https://t3n.zendesk.com/entries/44657214-Get-Anti-Affinity-Policies
 
>>> clc.v2.AntiAffinity.GetAll()
[<clc.APIv2.anti_affinity.AntiAffinity object at 0x10c65e910>, <clc.APIv2.anti_affinity.AntiAffinity object at 0x10c65ec90>]
GetLocation(location=None, alias=None)
Returns a list of anti-affinity policies within a specific location.
 
>>> clc.v2.AntiAffinity.GetLocation("VA1")
[<clc.APIv2.anti_affinity.AntiAffinity object at 0x105eeded0>]

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)