??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
Udac @ s d d l Z d d d YZ d Z e d Z e d Z e d Z e d Z e d Z e d
Z e d Z
e d Z e d
Z e d Z
e d Z e d Z d Z d Z d S( iNt OneAndOneResourcesc B s> e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z
RS( t firewall_policyt
load_balancert monitoring_policyt private_networkt public_ipt rolet servert usert vpn( t __name__t
__module__R R R R R R R R R ( ( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s c C sv i | j d 6| j d 6| j d 6| j d 6| j d 6| j d 6| j d 6| j d 6| j d 6} | j | d | S(
NR R R R R R R R R ( t get_firewallt get_load_balancert get_monitoring_policyt get_private_networkt
get_public_ipt get_rolet
get_servert get_usert get_vpnt gett None( t oneandone_connt
resource_typet resource_idt switcher( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt get_resource) s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( s_
Validates the datacenter exists by ID or country code.
Returns the datacenter ID.
t idt country_codeN( t list_datacenters( R t
datacentert full_objectt _datacenter( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt get_datacenter9 s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( sb
Validates the fixed instance size exists by ID or name.
Return the instance size ID.
R t nameN( t fixed_server_flavors( R t fixed_instance_sizeR t _fixed_instance_size( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt get_fixed_instance_sizeE s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( sT
Validates the appliance exists by ID or name.
Return the appliance ID.
t qt IMAGER R# N( t list_appliances( R t applianceR t
_appliance( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt
get_applianceR s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( s`
Validates the private network exists by ID or name.
Return the private network ID.
R# R N( t list_private_networks( R R R t _private_network( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR ^ s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( sd
Validates the monitoring policy exists by ID or name.
Return the monitoring policy ID.
R# R N( t list_monitoring_policies( R R R t _monitoring_policy( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR k s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( s`
Validates the firewall policy exists by ID or name.
Return the firewall policy ID.
R# R N( t list_firewall_policies( R R R t _firewall_policy( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt get_firewall_policyx s
c C sG x@ | j D]2 } | | d | d f k r
| r7 | S| d Sq
Wd S( s\
Validates the load balancer exists by ID or name.
Return the load balancer ID.
R# R N( t list_load_balancers( R R R t _load_balancer( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR
s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( sj
Validates that the server exists whether by ID or name.
Returns the server if one was found.
t per_pagei R R# N( t list_servers( R t instanceR R ( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( s`
Validates that the user exists by ID or a name.
Returns the user if one was found.
R7 i R R# N( t
list_users( R R R t _user( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( s
Given a name, validates that the role exists
whether it is a proper ID or a name.
Returns the role if one was found, else None.
R7 i R R# N( t
list_roles( R R R t _role( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( s^
Validates that the vpn exists by ID or a name.
Returns the vpn if one was found.
R7 i R R# N( t list_vpns( R R R t _vpn( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s
c C sM xF | j d d D]2 } | | d | d f k r | r= | S| d Sq Wd S( sj
Validates that the public ip exists by ID or a name.
Returns the public ip if one was found.
R7 i R t ipN( t list_public_ips( R R R t
_public_ip( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyR s
c C s+ t j | } x | t j k rt j | t | | | } | t j k rd | d d } n
| d } | t j k r | j d k s | t j k r | j d k r d S| j d k r t d | | f q | j d
k r q q t d | | f q Wt d | | f d S( sZ
Waits for the resource create operation to complete based on the timeout period.
t statust statet
powered_ont activeNt faileds %s creation failed for %st enabledt deployingt configurings Unknown %s state %ss* Timed out waiting for %s completion for %s( RF RH RI RJ ( t timet sleepR R R t lowert Exception( R R R t wait_timeoutt
wait_intervalt resourcet resource_state( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt% wait_for_resource_creation_completion s*
!! c C s t j | } x | t j k r t j | | j d d d d d d } | t j k rh d } n( | t j k r d } n t d | xZ | D]R } | d
d | k r | d d k r | d
| k r | d d d k r d Sq Wq Wt d | | f d S( sZ
Waits for the resource delete operation to complete based on the timeout period.
R( t DELETEt periodt LAST_HOURt sorts -start_datet VMt PRIVATENETWORKs5 Unsupported wait_for delete operation for %s resourceRQ R t actiont typeRC RD t OKNs( Timed out waiting for %s deletion for %s( RK RL t list_logsR R R RN ( R R R RO RP t logst _typet log( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt% wait_for_resource_deletion_completion s(
( ( RK R R t FalseR" R' R- R R R4 R
R R R R R RS Ra ( ( ( sB /usr/lib/python2.7/site-packages/ansible/module_utils/oneandone.pyt s
&