Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/f5/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
mZddl
mZdd
l
mZy�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZWn�ek
r�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZnXdefd��YZdefd��YZdefd��YZ defd��YZ!de!fd��YZ"d e!fd!��YZ#d"e$fd#��YZ%d$e$fd%��YZ&d&e$fd'��YZ'd(�Z(e)d)kre(�nd*S(+i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	certifiedtsupported_bys�
---
module: bigip_gtm_topology_record
short_description: Manages GTM Topology Records
description:
  - Manages GTM Topology Records. Once created, only topology record C(weight) can be modified.
version_added: 2.8
options:
  source:
    description:
      - Specifies the origination of an incoming DNS request.
    suboptions:
      negate:
        description:
          - When set to c(yes) the system selects this topology record, when the request source does not match.
        type: bool
        default: no
      subnet:
        description:
          - An IP address and network mask in the CIDR format.
        type: str
      region:
        description:
          - Specifies the name of region already defined in the configuration.
        type: str
      continent:
        description:
          - Specifies one of the seven continents, along with the C(Unknown) setting.
          - Specifying C(Unknown) forces the system to use a default resolution
            if the system cannot determine the location of the local DNS making the request.
          - Full continent names and their abbreviated versions are supported.
        type: str
      country:
        description:
          - Specifies a country.
          - In addition to the country full names, you may also specify their abbreviated
            form, such as C(US) instead of C(United States).
          - Valid country codes can be found here https://countrycode.org/.
        type: str
      state:
        description:
          - Specifies a state in a given country.
          - This parameter requires country option to be provided.
        type: str
      isp:
        description:
          - Specifies an Internet service provider.
        type: str
        choices:
          - AOL
          - BeijingCNC
          - CNC
          - ChinaEducationNetwork
          - ChinaMobilNetwork
          - ChinaRailwayTelcom
          - ChinaTelecom
          - ChinaUnicom
          - Comcast
          - Earthlink
          - ShanghaiCNC
          - ShanghaiTelecom
      geo_isp:
        description:
          - Specifies a geolocation ISP
        type: str
    type: dict
    required: True
  destination:
    description:
      - Specifies where the system directs the incoming DNS request.
    suboptions:
      negate:
        description:
          - When set to c(yes) the system selects this topology record, when the request destination does not match.
        type: bool
        default: no
      subnet:
        description:
          - An IP address and network mask in the CIDR format.
        type: str
      region:
        description:
          - Specifies the name of region already defined in the configuration.
        type: str
      continent:
        description:
          - Specifies one of the seven continents, along with the C(Unknown) setting.
          - Specifying C(Unknown) forces the system to use a default resolution
            if the system cannot determine the location of the local DNS making the request.
          - Full continent names and their abbreviated versions are supported.
        type: str
      country:
        description:
          - Specifies a country.
          - Full continent names and their abbreviated versions are supported.
        type: str
      state:
        description:
          - Specifies a state in a given country.
          - This parameter requires country option to be provided.
        type: str
      pool:
        description:
          - Specifies the name of GTM pool already defined in the configuration.
        type: str
      datacenter:
        description:
          - Specifies the name of GTM data center already defined in the configuration.
        type: str
      isp:
        description:
          - Specifies an Internet service provider.
        type: str
        choices:
          - AOL
          - BeijingCNC
          - CNC
          - ChinaEducationNetwork
          - ChinaMobilNetwork
          - ChinaRailwayTelcom
          - ChinaTelecom
          - ChinaUnicom
          - Comcast
          - Earthlink
          - ShanghaiCNC
          - ShanghaiTelecom
      geo_isp:
        description:
          - Specifies a geolocation ISP
        type: str
    type: dict
    required: True
  weight:
     description:
       - Specifies the weight of the topology record.
       - The system finds the weight of the first topology record that matches the server object (pool or pool member)
         and the local DNS. The system then assigns that weight as the topology score for that server object.
       - The system load balances to the server object with the highest topology score.
       - If the system finds no topology record that matches both the server object and the local DNS,
         then the system assigns that server object a zero score.
       - If the option is not specified when the record is created the system will set it at a default value of C(1)
       - Valid range is (0 - 4294967295)
     type: int
  partition:
    description:
      - Device partition to manage resources on.
      - Partition parameter is taken into account when used in conjunction with C(pool), C(data_center),
        and C(region) parameters, it is ignored otherwise.
    type: str
    default: Common
  state:
    description:
      - When C(state) is C(present), ensures that the record exists.
      - When C(state) is C(absent), ensures that the record is removed.
    type: str
    choices:
      - present
      - absent
    default: present
extends_documentation_fragment: f5
author:
  - Wojciech Wypior (@wojtek0806)
s�
- name: Create an IP Subnet and an ISP based topology record
  bigip_gtm_topology_record:
    source:
      - subnet: 192.168.1.0/24
    destination:
      - isp: AOL
    weight: 10
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Create a region and a pool based topology record
  bigip_gtm_topology_record:
    source:
      - region: Foo
    destination:
      - pool: FooPool
    partition: FooBar
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost

- name: Create a negative region and a negative data center based topology record
  bigip_gtm_topology_record:
    source:
      - region: Baz
      - negate: yes
    destination:
      - datacenter: Baz-DC
      - negate: yes
    provider:
      password: secret
      server: lb.mydomain.com
      user: admin
  delegate_to: localhost
sh
weight:
  description: The weight of the topology record.
  returned: changed
  type: int
  sample: 20
(t
AnsibleModule(tenv_fallback(t	iteritems(tF5RestClient(t
F5ModuleError(tAnsibleF5Parameters(tfq_name(tf5_argument_spec(ttransform_name(tflatten_boolean(tis_valid_ip_networkt
ParameterscB`s3eZidd6ZdgZddgZdgZRS(tweighttscoretname(t__name__t
__module__tapi_maptapi_attributestreturnablest
updatables(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�s
		t
ApiParameterscB`seZRS((RR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyRstModuleParameterscB`s�eZidd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6dd6dd6dd6dd	6d
d6dd
6dd6dd6dd6dd6dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6djdk6dldm6dndo6dpdq6drds6dtdu6dvdw6dxdy6dzd{6d|d}6d~d6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6dd6Zid�d6dd6dd6d�d�6d2d6d�d6dd6dd	6Zed
��Zed��Zed��Zed
��Zed��Z	ed��Z
ed��Zed��Zed��Z
ed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd�Zed ��ZRS(!tAFtAfghanistantAXs
Aland IslandstALtAlbaniatDZtAlgeriatASsAmerican SamoatADtAndorratAOtAngolatAItAnguillatAQt
AntarcticatAGsAntigua and BarbudatARt	ArgentinatAMtArmeniatAWtArubatAUt	AustraliatATtAustriatAZt
AzerbaijantBStBahamastBHtBahraintBDt
BangladeshtBBtBarbadostBYtBelarustBEtBelgiumtBZtBelizetBJtBenintBMtBermudatBTtBhutantBOtBoliviatBQs Bonaire, Sint Eustatius and SabatBAsBosnia and HerzegovinatBWtBotswanatBVs
Bouvet IslandtBRtBraziltIOsBritish Indian Ocean TerritorytBNsBrunei DarussalamtBGtBulgariatBFsBurkina FasotBItBurunditCVs
Cape VerdetKHtCambodiatCMtCameroontCAtCanadatKYsCayman IslandstCFsCentral African RepublictTDtChadtCLtChiletCNtChinatCXsChristmas IslandtCCsCocos (Keeling) IslandstCOtColombiatKMtComorostCGtCongotCDs%Congo, The Democratic Republic of thetCKsCook IslandstCRs
Costa RicatCIs
Cote D'IvoiretHRtCroatiatCUtCubatCWsCuraçaotCYtCyprustCZsCzech RepublictDKtDenmarktDJtDjiboutitDMtDominicatDOsDominican RepublictECtEcuadortEGtEgypttSVsEl SalvadortGQsEquatorial GuineatERtEritreatEEtEstoniatETtEthiopiatFKsFalkland Islands (Malvinas)tFOs
Faroe IslandstFJtFijitFItFinlandtFRtFrancetGFs
French GuianatPFsFrench PolynesiatTFsFrench Southern TerritoriestGAtGabontGMtGambiatGEtGeorgiatDEtGermanytGHtGhanatGIt	GibraltartGRtGreecetGLt	GreenlandtGDtGrenadatGPt
GuadeloupetGUtGuamtGTt	GuatemalatGGtGuernseytGNtGuineatGWs
Guinea-BissautGYtGuyanatHTtHaititHMs!Heard Island and McDonald IslandstVAsHoly See (Vatican City State)tHNtHondurastHKs	Hong KongtHUtHungarytIStIcelandtINtIndiatIDt	IndonesiatIRsIran, Islamic Republic oftIQtIraqtIEtIrelandtIMsIsle of MantILtIsraeltITtItalytJMtJamaicatJPtJapantJEtJerseytJOtJordantKZt
KazakhstantKEtKenyatKItKiribatitKPs&Korea, Democratic People's Republic oftKRsKorea, Republic oftKWtKuwaittKGt
KyrgyzstantLAs Lao People's Democratic RepublictLVtLatviatLBtLebanontLStLesothotLRtLiberiatLYsLibyan Arab JamahiriyatLIt
LiechtensteintLTt	LithuaniatLUt
LuxembourgtMOtMacautMKt	MacedoniatMGt
MadagascartMWtMalawitMYtMalaysiatMVtMaldivestMLtMalitMTtMaltatMHsMarshall IslandstMQt
MartiniquetMRt
MauritaniatMUt	MauritiustYTtMayottetMXtMexicotFMsMicronesia, Federated States oftMDsMoldova, Republic oftMCtMonacotMNtMongoliatMEt
MontenegrotMSt
MontserrattMAtMoroccotMZt
MozambiquetMMtMyanmartNAtNamibiatNRtNaurutNPtNepaltNLtNetherlandstNCs
New CaledoniatNZsNew ZealandtNIt	NicaraguatNEtNigertNGtNigeriatNUtNiuetNFsNorfolk IslandtMPsNorthern Mariana IslandstNOtNorwaytOMtOmantPKtPakistantPWtPalautPSsPalestinian TerritorytPAtPanamatPGsPapua New GuineatPYtParaguaytPEtPerutPHtPhilippinestPNsPitcairn IslandstPLtPolandtPTtPortugaltPRsPuerto RicotQAtQatartREtReuniontROtRomaniatRUsRussian FederationtRWtRwandatBLsSaint BarthelemytSHsSaint HelenatKNsSaint Kitts and NevistLCsSaint LuciatMFsSaint MartintPMsSaint Pierre and MiquelontVCs Saint Vincent and the GrenadinestWStSamoatSMs
San MarinotSTsSao Tome and PrincipetSAsSaudi ArabiatSNtSenegaltRStSerbiatSCt
SeychellestSLsSierra LeonetSGt	SingaporetSXsSint Maarten (Dutch part)tSKtSlovakiatSItSloveniatSBsSolomon IslandstSOtSomaliatZAsSouth AfricatGSs,South Georgia and the South Sandwich IslandstSSsSouth SudantEStSpaintLKs	Sri LankatSDtSudantSRtSurinametSJsSvalbard and Jan MayentSZt	SwazilandtSEtSwedentCHtSwitzerlandtSYsSyrian Arab RepublictTWtTaiwantTJt
TajikistantTZsTanzania, United Republic oftTHtThailandtTLsTimor-LestetTGtTogotTKtTokelautTOtTongatTTsTrinidad and TobagotTNtTunisiatTRtTurkeytTMtTurkmenistantTCsTurks and Caicos IslandstTVtTuvalutUGtUgandatUAtUkrainetAEsUnited Arab EmiratestGBsUnited KingdomtUSs
United StatestUMs$United States Minor Outlying IslandstUYtUruguaytUZt
UzbekistantVUtVanuatutVEt	VenezuelatVNtVietnamtVGsVirgin Islands, BritishtVIsVirgin Islands, U.S.tWFsWallis and FutunatEHsWestern SaharatYEtYementZMtZambiatZWtZimbabwesN/AtUnrecognizedtAPsAsia/Pacific RegiontEUtEuropetANsNetherlands AntillestFXsFrance, MetropolitantA1sAnonymous ProxytA2sSatellite ProvidertO1tOthertAsiatAfricas
North Americas
South AmericatOCtOceanias--tUnknowncC`s9|jdjdd�}t|�}|dkr5dSdS(Ntsourcetnegatetyestnot(t_valuestgettNoneR(tselft
src_negatetresult((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�$s
cC`sI|jdjdd�}|dkr)dSt|�r9|Std��dS(NR�tsubnets)Specified 'subnet' is not a valid subnet.(R�R�R�RR(R�t
src_subnet((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�,scC`s9|jdjdd�}|dkr)dSt|j|�S(NR�tregion(R�R�R�Rt	partition(R�t
src_region((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�7scC`sB|jdjdd�}|dkr)dS|jj||�}|S(NR�t	continent(R�R�R�t
continents(R�t
src_continentR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�>s
cC`sB|jdjdd�}|dkr)dS|jj||�}|S(NR�tcountry(R�R�R�t	countries(R�tsrc_countryR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�Fs
cC`ss|jdjdd�}|jdjdd�}|dkrBdS|dkr]td��ndj||�}|S(NR�R�tstates2Country needs to be provided when specifying states{0}/{1}(R�R�R�Rtformat(R�R�t	src_stateR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�NscC`s6|jdjdd�}|dkr)dStd|�S(NR�tisptCommon(R�R�R�R(R�tsrc_isp((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�[scC`s|jdjdd�}|S(NR�tgeo_isp(R�R�R�(R�tsrc_geo_isp((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�bscC`s9|jdjdd�}t|�}|dkr5dSdS(NtdestinationR�R�R�(R�R�R�R(R�t
dst_negateR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�gs
cC`sI|jdjdd�}|dkr)dSt|�r9|Std��dS(NR�R�s)Specified 'subnet' is not a valid subnet.(R�R�R�RR(R�t
dst_subnet((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�oscC`s9|jdjdd�}|dkr)dSt|j|�S(NR�R�(R�R�R�RR�(R�t
dst_region((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�zscC`sB|jdjdd�}|dkr)dS|jj||�}|S(NR�R�(R�R�R�R�(R�t
dst_continentR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s
cC`sB|jdjdd�}|dkr)dS|jj||�}|S(NR�R�(R�R�R�R�(R�tdst_countryR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s
cC`sc|j}|jdjdd�}|dkr2dS|dkrMtd��ndj||�}|S(NR�R�s2Country needs to be provided when specifying states{0}/{1}(R�R�R�R�RR�(R�R�t	dst_stateR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s	cC`s6|jdjdd�}|dkr)dStd|�S(NR�R�R�(R�R�R�R(R�tdst_isp((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��scC`s|jdjdd�}|S(NR�R�(R�R�R�(R�tdst_geo_isp((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��scC`s9|jdjdd�}|dkr)dSt|j|�S(NR�tpool(R�R�R�RR�(R�tdst_pool((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��scC`s9|jdjdd�}|dkr)dSt|j|�S(NR�t
datacenter(R�R�R�RR�(R�tdst_datacenter((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��scC`sri|jd6|jd6|jd6|jd6|jd6|jd6|jd6|jd6}d	j|j	|��}|S(
NR�R�R�R�R�R�R�s	geoip-isps	ldns: {0}(
R�R�R�R�R�R�R�R�R�t_format_options(R�toptionsR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s







cC`s�i
|jd6|jd6|jd6|jd6|jd6|jd6|jd6|jd6|jd	6|j	d
6}dj
|j|��}|S(NR�R�R�R�R�R�R�R�R�s	geoip-ispsserver: {0}(R�R�R�R�R�R�R�R�R�R�R�R�(R�R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s









cC`sdj|j|j�}|S(Ns{0} {1}(R�R�R�(R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�scC`s�d}td�t|�D��}drDd|j�krD|d=nd|j�krj|d}|d=n|j�\}}|r�dj|||�}|Sdj||�}|S(Ncs`s-|]#\}}|dk	r||fVqdS(N(R�(t.0tktv((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pys	<genexpr>�sR�R�R�s{0} {1} {2}s{0} {1}(R�tdictR
tkeystpopitemR�(R�R�R�tcleanedRtvalueR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR��s


cC`sM|jd}|dkrdSd|ko4dknr=|Std��dS(NRiI����s,Valid weight must be in range 0 - 4294967295(R�R�R(R�R((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�s
(RRR�R�tpropertyR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�R(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyRsD



	tChangescB`seZd�ZRS(cC`sXi}y:x$|jD]}t||�||<qW|j|�}Wntk
rSnX|S(N(Rtgetattrt_filter_paramst	Exception(R�R�t
returnable((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt	to_return�s
(RRR	(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�st
UsableChangescB`seZRS((RR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR
stReportableChangescB`seZRS((RR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyRst
DifferencecB`s&eZdd�Zd�Zd�ZRS(cC`s||_||_dS(N(twantthave(R�R
R((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt__init__
s	cC`s9yt||�}|SWntk
r4|j|�SXdS(N(RtAttributeErrort_Difference__default(R�tparamR�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pytcompares

cC`sQt|j|�}y&t|j|�}||kr7|SWntk
rL|SXdS(N(RR
RR(R�Rtattr1tattr2((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt	__defaults
N(RRR�RRR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyRs	t
ModuleManagercB`s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�ZRS(cO`s^|jdd�|_t|jj�|_td|jj�|_t�|_	t
�|_dS(Ntmoduletparams(R�R�RRRtclientRR
RRR
tchanges(R�targstkwargs((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR#s
cC`sji}xBtjD]7}t|j|�dk	rt|j|�||<qqW|rftd|�|_ndS(NR(RRRR
R�R
R(R�tchangedtkey((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt_set_changed_options*scC`s�t|j|j�}tj}t�}xX|D]P}|j|�}|dkrUq.q.t|t�rt|j	|�q.|||<q.W|r�t
d|�|_tSt
S(NR(RR
RRRR�RR�t
isinstancetupdateR
RtTruetFalse(R�tdiffRRR�tchange((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt_update_changed_options2s		
cC`s|j�}|rtStS(N(R'R#R$(R�R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt
should_updateDscC`s�t}t�}|jj}|dkr6|j�}n|dkrQ|j�}ntd|jj��}|j�}|j	|�|j	td|��|j
|�|S(NtpresenttabsentRR(R$R�R
R�R)R*RRR	R"t_announce_deprecations(R�RR�R�t
reportableR((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pytexec_moduleJs	

cC`sK|jdg�}x2|D]*}|jjjd|dd|d�qWdS(Nt
__warningstmsgtversion(tpopRRt	deprecate(R�R�twarningstwarning((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR+[s


cC`s$|j�r|j�S|j�SdS(N(texistsR"tcreate(R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR)cs
cC`s|j�r|j�StS(N(R5tremoveR$(R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR*is
cC`s=|j�|_|j�stS|jjr/tS|j�tS(N(tread_current_from_deviceRR(R$Rt
check_modeR#tupdate_on_device(R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR"ns
cC`s9|jjrtS|j�|j�r5td��ntS(NsFailed to delete the resource.(RR9R#tremove_from_deviceR5R(R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR7ws
cC`s(|j�|jjrtS|j�tS(N(R RR9R#tcreate_on_device(R�((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR6s


cC`s�|jj}dj|jjd|jjd|jdd�jdd��}|jjj|�}y|j�}Wnt	k
r�t
SX|jdks�d	|kr�|d	dkr�t
StS(
Ns(https://{0}:{1}/mgmt/tm/gtm/topology/{2}tservertserver_portt s%20t/t~i�tcode(
R
RR�RtprovidertreplacetapiR�tjsont
ValueErrorR$RR#(R�Rturitresptresponse((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR5�s

!
+cC`s�|jj�}|jj|d<dj|jjd|jjd�}|jjj|d|�}y|j	�}Wn%t
k
r�}tt|���nXd|kr�|dd
kr�d	|kr�t|d	��q�t|j
��ntS(NRs%https://{0}:{1}/mgmt/tm/gtm/topology/R=R>RFRBi�i�tmessage(i�i�(Rt
api_paramsR
RR�RRCREtpostRFRGRtstrtcontentR#(R�RRHRIRJtex((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR<�s
cC`s|jj�}|jj}dj|jjd|jjd|jdd�jdd��}|jjj	|d|�}y|j
�}Wn%tk
r�}tt
|���nXd	|kr�|d	d
kr�d|kr�t|d��q�t|j��ndS(Ns(https://{0}:{1}/mgmt/tm/gtm/topology/{2}R=R>R?s%20R@RARFRBi�RK(RRLR
RR�RRCRDREtpatchRFRGRRNRO(R�RRRHRIRJRP((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR:�s

!cC`s�|jj}dj|jjd|jjd|jdd�jdd��}|jjj|�}|jdkrut	St
|j��dS(	Ns(https://{0}:{1}/mgmt/tm/gtm/topology/{2}R=R>R?s%20R@RAi�(R
RR�RRCRDREtdeleteRR#RRO(R�RRHRJ((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR;�s

!cC`s�|jj}dj|jjd|jjd|jdd�jdd��}|jjj|�}y|j�}Wn%t	k
r�}t
t|���nXd|kr�|dd	kr�d
|kr�t
|d
��q�t
|j��nt
d|�S(Ns(https://{0}:{1}/mgmt/tm/gtm/topology/{2}R=R>R?s%20R@RARBi�RKR(R
RR�RRCRDRER�RFRGRRNROR(R�RRHRIRJRP((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR8�s

!(RRRR R'R(R-R+R)R*R"R7R6R5R<R:R;R8(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR"s 																tArgumentSpeccB`seZd�ZRS(c#C`s�t|_ddddddddd	d
ddg|_td
tdtdddtdt�dt�dt�dt�dt�dtd|j�dt�dtdddd��dddddddgg�dtdtdddtdt�dt�dt�dt�dt�d t�d!t�dtd|j�dt�dtdddd��
dddddd d!ddgg�d"tdd#�d$tdd%d&td'gf�dtdd(dd(d)g��}i|_|jjt�|jj|�dS(*NtAOLt
BeijingCNCtCNCtChinaEducationNetworktChinaMobilNetworktChinaRailwayTelcomtChinaTelecomtChinaUnicomtComcastt	EarthlinktShanghaiCNCtShanghaiTelecomR�trequiredttypeR�R�R�R�R�R�R�R�tchoicesR�R�tbooltdefaulttnotmutually_exclusiveR�R�R�RtintR�R�tfallbacktF5_PARTITIONR)R*(R#tsupports_check_modeRbR�R	t
argument_specR"R(R�Rk((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyR�sd																$	(RRR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyRS�scC`s�t�}td|jd|j�}y,td|�}|j�}|j|�Wn)tk
r{}|jdt	|��nXdS(NRkRjRR/(
RSRRkRjRR-t	exit_jsonRt	fail_jsonRN(tspecRtmmtresultsRP((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pytmain's		t__main__N(*t
__future__RRRRat
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNtansible.module_utils.basicRR	tansible.module_utils.sixR
t%library.module_utils.network.f5.bigipRt&library.module_utils.network.f5.commonRR
RRRRt)library.module_utils.network.f5.ipaddressRtImportErrort%ansible.module_utils.network.f5.bigipt&ansible.module_utils.network.f5.commont)ansible.module_utils.network.f5.ipaddressRRRRR
RtobjectRRRSRqR(((sX/usr/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_gtm_topology_record.pyt<module>sR


�*
���G	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]