§
    ÎÑßjwY ã                   óˆ  — d dl Z d dlZd dlmZmZ d dlmZmZmZm	Z	m
Z
mZmZmZ d dlmZmZmZmZ d dlmZ d dlmZ d dlmZ d„ Z	 i d	d
edœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“ddedœ“d d!edœ“d"d#edœ“d$d%edœ“d&d&edœ“d'edœd(edœd)edœd*œ¥i d+d+edœ“d,d-edœ“ddedœ“d.d/edœ“d0d0edœ“d1d2edœ“d3d4edœ“d5d6edœ“d7d8edœ“d9d:edœ“d;d<edœ“d=d>edœ“d?d@edœ“dAdAedœ“dBdBedœ“dCd)edœ“dDdEedœ“dFedœdGedœdHedœd:edœdedœdedœd-edœdedœdIœdFedœdJedœdKedœd!edœdedœdLedœdedœd-edœdMœi dNdNedœ“dOdOedœ“dPdPedœ“dQdQedœ“dJdJedœ“dKdKedœ“dRdRedœ“dSdSedœ“dTdTedœ“dUdUedœ“dVdVedœ“dWdWedœ“dXdXedœ“dYdYedœ“dZdZedœ“d[d[edœ“d\d\edœ“i d]d]edœ“d^d^edœ“d_d_edœ“d`d`edœ“dadaedœ“dbdbedœ“dcdcedœ“ddedœ“ddddedœ“dedeedœ“dfdfedœ“dgdgedœ“dhdhedœ“didiedœ“djdjedœ“dkdkedœ“dldledœ“¥dmedœdnedœdoedœdpedœdqedœdrœ¥dsdtedœiduedœdBedœd)edœdvedœdwœdNedœdJedœdKedœdxedœdyedœdzedœd{edœd|œdNedœdJedœdKedœduedœdBedœd)edœd}œd~œ	Z G d„ d€e¦  «        Z G d�„ d‚¦  «        Z G dƒ„ d„¦  «        Z  G d…„ d†¦  «        Z! G d‡„ dˆ¦  «        Z" G d‰„ dŠ¦  «        Z# G d‹„ dŒ¦  «        Z$ G d�„ dŽ¦  «        Z% G d�„ d�¦  «        Z& G d‘„ d’¦  «        Z' G d“„ d”¦  «        Z( G d•„ d–¦  «        Z) G d—„ d˜¦  «        Z* G d™„ dš¦  «        Z+ G d›„ dœ¦  «        Z, G d�„ dž¦  «        Z- G dŸ„ d ¦  «        Z. G d¡„ d¢¦  «        Z/ G d£„ d¤¦  «        Z0 G d¥„ d¦¦  «        Z1 G d§„ d¨¦  «        Z2 G d©„ dªee
¦  «        Z3dS )«é    N)ÚbÚurlparse)ÚNodeÚKeyPairÚNodeSizeÚ	NodeImageÚ
NodeDriverÚNodeLocationÚStorageVolumeÚVolumeSnapshot)Ú	NodeStateÚLibcloudErrorÚStorageVolumeStateÚKeyPairDoesNotExistError)Úis_private_subnet)ÚCloudStackDriverMixIn)ÚProviderc                 ó    — 	 t          | ¦  «        S # t          $ r2}t          | ¦  «                             ¦   «         dk    rY d }~dS |‚d }~ww xY w)NÚ	unlimitedéÿÿÿÿ)ÚintÚ
ValueErrorÚstrÚlower)ÚvalueÚes     úW/opt/saltstack/salt/lib/python3.11/site-packages/libcloud/compute/drivers/cloudstack.pyÚtransform_int_or_unlimitedr   +   sa   € ðÝ�5‰zŒzÐøÝð ð ð Ýˆu‰:Œ:×ÒÑÔ Ò,Ð,Ø�2�2�2�2�2àˆøøøøð	øøøs   ‚ ‘
A›%AÁAÁAÚbroadcast_domain_typeÚbroadcastdomaintype)Úkey_nameÚtransform_funcÚtraffic_typeÚtraffictypeÚ	zone_nameÚzonenameÚnetwork_offering_nameÚnetworkofferingnameÚnetwork_offeringdisplay_textÚnetworkofferingdisplaytextÚnetwork_offering_availabilityÚnetworkofferingavailabilityÚ	is_systemÚissystemÚstateÚdns1Údns2ÚtypeÚacl_typeÚacltypeÚsubdomain_accessÚsubdomainaccessÚnetwork_domainÚnetworkdomainÚphysical_network_idÚphysicalnetworkidÚcan_use_for_deployÚcanusefordeployÚgatewayÚnetmaskÚvpcidÚ	projectid)r>   Úvpc_idÚ
project_idÚhaenableÚzone_idÚzoneidr!   ÚkeypairÚpasswordÚimage_idÚ
templateidÚ
image_nameÚtemplatenameÚtemplate_display_textÚtemplatdisplaytextÚpassword_enabledÚpasswordenabledÚsize_idÚserviceofferingidÚ	size_nameÚserviceofferingnameÚroot_device_idÚrootdeviceidÚroot_device_typeÚrootdevicetypeÚ
hypervisorÚprojectrB   znics:ÚnicÚcreatedÚdeviceidÚvirtualmachineid)r[   Ú	device_idÚinstance_idÚserviceoffering_idr/   Úvolume_typerD   r%   ÚdomainÚdomainidÚvpcofferingid)r[   rb   Ú	domain_idr7   r/   Úvpc_offering_idr%   rD   ÚaccountÚcpuavailableÚcpulimitÚcputotalÚipavailableÚiplimitÚiptotalÚmemoryavailableÚmemorylimitÚmemorytotalÚnetworkavailableÚnetworklimitÚnetworktotalÚprimarystorageavailableÚprimarystoragelimitÚprimarystoragetotalÚsecondarystorageavailableÚsecondarystoragelimitÚsecondarystoragetotalÚsnapshotavailableÚsnapshotlimitÚsnapshottotalÚtagsÚtemplateavailableÚtemplatelimitÚtemplatetotalÚvmavailableÚvmlimitÚ	vmrunningÚvmtotalÚvolumeavailableÚvolumelimitÚvolumetotalÚvpcavailableÚvpclimitÚvpctotal)r†   r‡   rˆ   r‰   rŠ   Úsecondary_ipÚsecondaryipÚ
fordisplayÚremoved)Úfor_displayrY   rB   rŽ   ÚdpdÚesplifetimeÚikelifetimeÚname)rg   rb   re   r�   Úesp_lifetimeÚike_lifetimer“   )rg   rb   re   r�   rY   rB   )	ÚnetworkÚnodeÚvolumeÚvpcrY   rZ   Ú
vpngatewayÚvpncustomergatewayÚvpnconnectionc                   óZ   — e Zd ZdZd„ Zd„ Zdd„Z	 	 	 dd„Zd„ Zd	„ Z	dd
„Z
d„ Zd„ Zd„ ZdS )ÚCloudStackNodezB
    Subclass of Node so we can expose our extension methods.
    c                 ó6   — | j                              | ¦  «        S )z@
        Allocate a public IP and bind it to this node.
        )ÚdriverÚex_allocate_public_ip©Úselfs    r   r¡   z$CloudStackNode.ex_allocate_public_ip@  s   € ð Œ{×0Ò0°Ñ6Ô6Ð6ó    c                 ó8   — | j                              | |¦  «        S )z;
        Release a public IP that this node holds.
        ©r    Úex_release_public_ip)r£   Úaddresss     r   r§   z#CloudStackNode.ex_release_public_ipF  s   € ð Œ{×/Ò/°°gÑ>Ô>Ð>r¤   Nc                 ó@   — | j                              | ||||¬¦  «        S )zI
        Add a NAT/firewall forwarding rule for a port or ports.
        )r—   r¨   ÚprotocolÚ
start_portÚend_port)r    Úex_create_ip_forwarding_rule)r£   r¨   rª   r«   r¬   s        r   r­   z+CloudStackNode.ex_create_ip_forwarding_ruleL  s2   € ð Œ{×7Ò7ØØØØ!Øð 8ñ 
ô 
ð 	
r¤   Tc           
      óF   — | j                              | |||||||¬¦  «        S )z?
        Add a port forwarding rule for port or ports.
        )r—   r¨   Úprivate_portÚpublic_portrª   Úpublic_end_portÚprivate_end_portÚopenfirewall)r    Úex_create_port_forwarding_rule)r£   r¨   r¯   r°   rª   r±   r²   r³   s           r   r´   z-CloudStackNode.ex_create_port_forwarding_ruleX  s;   € ð Œ{×9Ò9ØØØ%Ø#ØØ+Ø-Ø%ð :ñ 	
ô 	
ð 		
r¤   c                 ó:   — | j                              | |¬¦  «        S )z0
        Delete a port forwarding rule.
        ©r—   Úrule)r    Úex_delete_ip_forwarding_rule©r£   r·   s     r   r¸   z+CloudStackNode.ex_delete_ip_forwarding_rulep  s   € ð Œ{×7Ò7¸TÈÐ7ÑMÔMÐMr¤   c                 ó:   — | j                              | |¬¦  «        S )z-
        Delete a NAT/firewall rule.
        r¶   )r    Úex_delete_port_forwarding_ruler¹   s     r   r»   z-CloudStackNode.ex_delete_port_forwarding_rulev  s   € ð Œ{×9Ò9¸tÈ$Ð9ÑOÔOÐOr¤   c                 ó:   — | j                              | |¬¦  «        S )z)
        Restore virtual machine
        )r—   Útemplate)r    Ú
ex_restore)r£   r½   s     r   r¾   zCloudStackNode.ex_restore|  s   € ð Œ{×%Ò%¨4¸(Ð%ÑCÔCÐCr¤   c                 ó:   — | j                              | |¬¦  «        S )z6
        Change virtual machine offering/size
        )r—   Úoffering)r    Úex_change_node_size)r£   rÀ   s     r   rÁ   z"CloudStackNode.ex_change_node_size‚  s   € ð Œ{×.Ò.°DÀ8Ð.ÑLÔLÐLr¤   c                 ó8   — | j                              | ¬¦  «        S )z3
        Starts a stopped virtual machine.
        ©r—   )r    Úex_startr¢   s    r   rÄ   zCloudStackNode.ex_startˆ  s   € ð Œ{×#Ò#¨Ð#Ñ.Ô.Ð.r¤   c                 ó8   — | j                              | ¬¦  «        S )z2
        Stops a running virtual machine.
        rÃ   )r    Úex_stopr¢   s    r   rÆ   zCloudStackNode.ex_stopŽ  s   € ð Œ{×"Ò"¨Ð"Ñ-Ô-Ð-r¤   ©N)NNT)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r¡   r§   r­   r´   r¸   r»   r¾   rÁ   rÄ   rÆ   © r¤   r   rž   rž   ;  sÛ   € € € € € ðð ð7ð 7ð 7ð?ð ?ð ?ð

ð 

ð 

ð 

ð$ ØØð
ð 
ð 
ð 
ð0Nð Nð NðPð Pð PðDð Dð Dð DðMð Mð Mð/ð /ð /ð.ð .ð .ð .ð .r¤   rž   c                   ó2   — e Zd ZdZ	 	 	 dd„Zd„ Zd„ Zd„ ZdS )ÚCloudStackAddressan  
    A public IP address.

    :param      id: UUID of the Public IP
    :type       id: ``str``

    :param      address: The public IP address
    :type       address: ``str``

    :param      associated_network_id: The ID of the network where this address
                                        has been associated with
    :type       associated_network_id: ``str``

    :param      vpc_id: VPC the ip belongs to
    :type       vpc_id: ``str``

    :param      virtualmachine_id: The ID of virtual machine this address
                                   is assigned to
    :type       virtualmachine_id: ``str``
    Nc                 óZ   — || _         || _        || _        || _        || _        || _        d S rÇ   )Úidr¨   r    Úassociated_network_idrA   Úvirtualmachine_id)r£   rÐ   r¨   r    rÑ   rA   rÒ   s          r   Ú__init__zCloudStackAddress.__init__«  s6   € ð ˆŒØˆŒØˆŒØ%:ˆÔ"ØˆŒØ!2ˆÔÐÐr¤   c                 ó<   — | j                              | ¬¦  «         d S )N©r¨   r¦   r¢   s    r   ÚreleasezCloudStackAddress.release»  s!   € ØŒ×(Ò(°Ð(Ñ6Ô6Ð6Ð6Ð6r¤   c                 ó   — | j         S rÇ   rÕ   r¢   s    r   Ú__str__zCloudStackAddress.__str__¾  s
   € ØŒ|Ðr¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   ©Ú	__class__rÐ   ©r£   Úothers     r   Ú__eq__zCloudStackAddress.__eq__Á  ó   € ØŒ~ ¤Ð0ÐH°T´WÀÄÒ5HÐHr¤   ©NNN)rÈ   rÉ   rÊ   rË   rÓ   rÖ   rØ   rÞ   rÌ   r¤   r   rÎ   rÎ   •  so   € € € € € ðð ð4 #ØØð3ð 3ð 3ð 3ð 7ð 7ð 7ðð ð ðIð Ið Ið Ið Ir¤   rÎ   c                   ó(   — e Zd ZdZ	 	 	 	 dd„Zd„ ZdS )ÚCloudStackFirewallRulez
    A firewall rule.
    Nc	                 óv   — || _         || _        || _        || _        || _        || _        || _        || _        dS )a£  
        A Firewall rule.

        @note: This is a non-standard extension API, and only works for
               CloudStack.

        :param      id: Firewall Rule ID
        :type       id: ``int``

        :param      address: External IP address
        :type       address: :class:`CloudStackAddress`

        :param      cidr_list: cidr list
        :type       cidr_list: ``str``

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      icmp_code: Error code for this icmp message
        :type       icmp_code: ``int``

        :param      icmp_type: Type of the icmp message being sent
        :type       icmp_type: ``int``

        :param      start_port: start of port range
        :type       start_port: ``int``

        :param      end_port: end of port range
        :type       end_port: ``int``

        :rtype: :class:`CloudStackFirewallRule`
        N)rÐ   r¨   Ú	cidr_listrª   Ú	icmp_codeÚ	icmp_typer«   r¬   )	r£   rÐ   r¨   rä   rª   rå   ræ   r«   r¬   s	            r   rÓ   zCloudStackFirewallRule.__init__Ê  sA   € ðX ˆŒØˆŒØ"ˆŒØ ˆŒØ"ˆŒØ"ˆŒØ$ˆŒØ ˆŒˆˆr¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   zCloudStackFirewallRule.__eq__ÿ  rß   r¤   ©NNNN©rÈ   rÉ   rÊ   rË   rÓ   rÞ   rÌ   r¤   r   râ   râ   Å  sU   € € € € € ðð ð ØØØð3!ð 3!ð 3!ð 3!ðjIð Ið Ið Ið Ir¤   râ   c                   ó(   — e Zd ZdZ	 	 	 	 dd„Zd„ ZdS )ÚCloudStackEgressFirewallRulez!
    A egress firewall rule.
    Nc	                 óv   — || _         || _        || _        || _        || _        || _        || _        || _        dS )aÚ  
        A egress firewall rule.

        @note: This is a non-standard extension API, and only works for
               CloudStack.

        :param      id: Firewall Rule ID
        :type       id: ``int``

        :param      network_id: the id network network for the egress firwall
                    services
        :type       network_id: ``str``

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      cidr_list: cidr list
        :type       cidr_list: ``str``

        :param      icmp_code: Error code for this icmp message
        :type       icmp_code: ``int``

        :param      icmp_type: Type of the icmp message being sent
        :type       icmp_type: ``int``

        :param      start_port: start of port range
        :type       start_port: ``int``

        :param      end_port: end of port range
        :type       end_port: ``int``

        :rtype: :class:`CloudStackEgressFirewallRule`
        N)rÐ   Ú
network_idrä   rª   rå   ræ   r«   r¬   )	r£   rÐ   rí   rä   rª   rå   ræ   r«   r¬   s	            r   rÓ   z%CloudStackEgressFirewallRule.__init__  sA   € ðZ ˆŒØ$ˆŒØ"ˆŒØ ˆŒØ"ˆŒØ"ˆŒØ$ˆŒØ ˆŒˆˆr¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   z#CloudStackEgressFirewallRule.__eq__>  rß   r¤   rè   ré   rÌ   r¤   r   rë   rë     sU   € € € € € ðð ð ØØØð4!ð 4!ð 4!ð 4!ðlIð Ið Ið Ið Ir¤   rë   c                   ó&   — e Zd ZdZdd„Zd„ Zd„ ZdS )ÚCloudStackIPForwardingRulez)
    A NAT/firewall forwarding rule.
    Nc                 óZ   — || _         || _        || _        || _        || _        || _        dS )aâ  
        A NAT/firewall forwarding rule.

        @note: This is a non-standard extension API, and only works for
               CloudStack.

        :param      node: Node for rule
        :type       node: :class:`Node`

        :param      id: Rule ID
        :type       id: ``int``

        :param      address: External IP address
        :type       address: :class:`CloudStackAddress`

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      start_port: Start port for the rule
        :type       start_port: ``int``

        :param      end_port: End port for the rule
        :type       end_port: ``int``

        :rtype: :class:`CloudStackIPForwardingRule`
        N)r—   rÐ   r¨   rª   r«   r¬   )r£   r—   rÐ   r¨   rª   r«   r¬   s          r   rÓ   z#CloudStackIPForwardingRule.__init__G  s2   € ð6 ˆŒ	ØˆŒØˆŒØ ˆŒØ$ˆŒØ ˆŒˆˆr¤   c                 ó<   — | j                              | ¬¦  «         d S ©N)r·   )r—   r¸   r¢   s    r   Údeletez!CloudStackIPForwardingRule.deletei  s!   € ØŒ	×.Ò.°DÐ.Ñ9Ô9Ð9Ð9Ð9r¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   z!CloudStackIPForwardingRule.__eq__l  rß   r¤   rÇ   ©rÈ   rÉ   rÊ   rË   rÓ   rô   rÞ   rÌ   r¤   r   rð   rð   B  sV   € € € € € ðð ð !ð  !ð  !ð  !ðD:ð :ð :ðIð Ið Ið Ið Ir¤   rð   c                   ó,   — e Zd ZdZ	 	 	 dd„Zd„ Zd„ ZdS )ÚCloudStackPortForwardingRulez0
    A Port forwarding rule for Source NAT.
    Nc
                 óv   — || _         || _        || _        || _        || _        || _        || _        || _        dS )a¼  
        A Port forwarding rule for Source NAT.

        @note: This is a non-standard extension API, and only works for EC2.

        :param      node: Node for rule
        :type       node: :class:`Node`

        :param      rule_id: Rule ID
        :type       rule_id: ``int``

        :param      address: External IP address
        :type       address: :class:`CloudStackAddress`

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      public_port: External port for rule (or start port if
                                 public_end_port is also provided)
        :type       public_port: ``int``

        :param      private_port: Internal node port for rule (or start port if
                                  public_end_port is also provided)
        :type       private_port: ``int``

        :param      public_end_port: End of external port range
        :type       public_end_port: ``int``

        :param      private_end_port: End of internal port range
        :type       private_end_port: ``int``

        :param      network_id: The network of the vm the Port Forwarding rule
                                will be created for. Required when public Ip
                                address is not associated with any Guest
                                network yet (VPC case)
        :type       network_id: ``str``

        :rtype: :class:`CloudStackPortForwardingRule`
        N)r—   rÐ   r¨   rª   r°   r±   r¯   r²   )
r£   r—   Úrule_idr¨   rª   r°   r¯   r±   r²   rí   s
             r   rÓ   z%CloudStackPortForwardingRule.__init__u  sG   € ðf ˆŒ	ØˆŒØˆŒØ ˆŒØ&ˆÔØ.ˆÔØ(ˆÔØ 0ˆÔÐÐr¤   c                 ó<   — | j                              | ¬¦  «         d S ró   )r—   r»   r¢   s    r   rô   z#CloudStackPortForwardingRule.delete±  s!   € ØŒ	×0Ò0°dÐ0Ñ;Ô;Ð;Ð;Ð;r¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   z#CloudStackPortForwardingRule.__eq__´  rß   r¤   rà   rö   rÌ   r¤   r   rø   rø   p  sa   € € € € € ðð ð ØØð:1ð :1ð :1ð :1ðx<ð <ð <ðIð Ið Ið Ið Ir¤   rø   c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚCloudStackNetworkACLListz)
    a Network ACL for the given VPC
    Nc                 óL   — || _         || _        || _        || _        || _        dS )aQ  
        a Network ACL for the given VPC

        @note: This is a non-standard extension API, and only works for
               Cloudstack.

        :param      acl_id: ACL ID
        :type       acl_id: ``int``

        :param      name: Name of the network ACL List
        :type       name: ``str``

        :param      vpc_id: Id of the VPC associated with this network ACL List
        :type       vpc_id: ``string``

        :param      description: Description of the network ACL List
        :type       description: ``str``

        :rtype: :class:`CloudStackNetworkACLList`
        N©rÐ   r“   rA   r    Údescription)r£   Úacl_idr“   rA   r    r  s         r   rÓ   z!CloudStackNetworkACLList.__init__½  s.   € ð, ˆŒØˆŒ	ØˆŒØˆŒØ&ˆÔÐÐr¤   c                 ób   — d| j         ›d| j        ›d| j        ›d| j        j        ›d| j        ›d�S )Nz<CloudStackNetworkACLList: id=ú, name=ú	, vpc_id=ú	, driver=z, description=ú>r   r¢   s    r   Ú__repr__z!CloudStackNetworkACLList.__repr__Ù  sC   € € ð ŒWˆWˆW�d”i�i�i ¤  ¨d¬kÔ.>Ð.>Ð.>ÀÔ@PÐ@PÐ@PðRð 	Rr¤   rÇ   ©rÈ   rÉ   rÊ   rË   rÓ   r  rÌ   r¤   r   rþ   rþ   ¸  sF   € € € € € ðð ð'ð 'ð 'ð 'ð8Rð Rð Rð Rð Rr¤   rþ   c                   ó"   — e Zd ZdZ	 dd„Zd„ ZdS )ÚCloudStackNetworkACLzL
    a ACL rule in the given network (the network has to belong to VPC)
    Nc	                 óv   — || _         || _        || _        || _        || _        || _        || _        || _        dS )aÛ  
        a ACL rule in the given network (the network has to belong to
        VPC)

        @note: This is a non-standard extension API, and only works for
               Cloudstack.

        :param      id: the ID of the ACL Item
        :type       id ``int``

        :param      protocol: the protocol for the ACL rule. Valid values are
                               TCP/UDP/ICMP/ALL or valid protocol number
        :type       protocol: ``string``

        :param      acl_id: Name of the network ACL List
        :type       acl_id: ``str``

        :param      action: scl entry action, allow or deny
        :type       action: ``string``

        :param      cidr_list: the cidr list to allow traffic from/to
        :type       cidr_list: ``str``

        :param      start_port: the starting port of ACL
        :type       start_port: ``str``

        :param      end_port: the ending port of ACL
        :type       end_port: ``str``

        :param      traffic_type: the traffic type for the ACL,can be Ingress
                                  or Egress, defaulted to Ingress if not
                                  specified
        :type       traffic_type: ``str``

        :rtype: :class:`CloudStackNetworkACL`
        N)rÐ   rª   r  Úactionrä   r«   r¬   r#   )	r£   rÐ   rª   r  r  rä   r«   r¬   r#   s	            r   rÓ   zCloudStackNetworkACL.__init__ä  sD   € ð` ˆŒØ ˆŒØˆŒØˆŒØ"ˆŒØ$ˆŒØ ˆŒØ(ˆÔÐÐr¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   zCloudStackNetworkACL.__eq__  rß   r¤   rÇ   ré   rÌ   r¤   r   r  r  ß  sL   € € € € € ðð ð ð7)ð 7)ð 7)ð 7)ðrIð Ið Ið Ið Ir¤   r  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚCloudStackDiskOfferingz,
    A disk offering within CloudStack.
    c                 ó>   — || _         || _        || _        || _        d S rÇ   ©rÐ   r“   ÚsizeÚcustomizable)r£   rÐ   r“   r  r  s        r   rÓ   zCloudStackDiskOffering.__init__&  s%   € ØˆŒØˆŒ	ØˆŒ	Ø(ˆÔÐÐr¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   zCloudStackDiskOffering.__eq__,  rß   r¤   Nré   rÌ   r¤   r   r  r  !  sA   € € € € € ðð ð)ð )ð )ðIð Ið Ið Ið Ir¤   r  c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚCloudStackNetworkz2
    Class representing a CloudStack Network.
    Nc                 ól   — || _         || _        || _        || _        || _        || _        |pi | _        d S rÇ   )Údisplaytextr“   ÚnetworkofferingidrÐ   rE   r    Úextra)r£   r  r“   r  rÐ   rE   r    r  s           r   rÓ   zCloudStackNetwork.__init__5  s=   € Ø&ˆÔØˆŒ	Ø!2ˆÔØˆŒØˆŒØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ór   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )Nz <CloudStackNetwork: displaytext=r  z, networkofferingid=ú, id=z	, zoneid=r  r  )r  r“   r  rÐ   rE   r    r¢   s    r   r  zCloudStackNetwork.__repr__>  sQ   € € ð ÔÐÐØŒIˆIˆIØÔ"Ð"Ð"ØŒGˆGˆGØŒKˆKˆKØŒKÔÐÐð
ð 	
r¤   rÇ   r	  rÌ   r¤   r   r  r  0  sA   € € € € € ðð ð!ð !ð !ð !ð
ð 
ð 
ð 
ð 
r¤   r  c                   ó"   — e Zd ZdZ	 dd„Zd„ ZdS )ÚCloudStackNetworkOfferingz;
    Class representing a CloudStack Network Offering.
    Nc	                 óz   — || _         || _        || _        || _        || _        || _        || _        |pi | _        d S rÇ   )Údisplay_textr“   Úguest_ip_typerÐ   Úservice_offering_idÚfor_vpcr    r  )	r£   r“   r!  r"  rÐ   r#  r$  r    r  s	            r   rÓ   z"CloudStackNetworkOffering.__init__R  sG   € ð )ˆÔØˆŒ	Ø*ˆÔØˆŒØ#6ˆÔ ØˆŒØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ó‚   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )	Nz<CloudStackNetworkOffering: id=r  ú, display_text=z, guest_ip_type=z, service_offering_id=z
, for_vpc=r  r  )rÐ   r“   r!  r"  r#  r$  r    r¢   s    r   r  z"CloudStackNetworkOffering.__repr__f  s]   € € ð ŒGˆGˆGØŒIˆIˆIØÔÐÐØÔÐÐØÔ$Ð$Ð$ØŒLˆLˆLØŒKÔÐÐð
ð 	
r¤   rÇ   r	  rÌ   r¤   r   r  r  M  sF   € € € € € ðð ð ð!ð !ð !ð !ð(
ð 
ð 
ð 
ð 
r¤   r  c                   ó(   — e Zd ZdZ	 dd„Zd„ Zd„ ZdS )ÚCloudStackNicz<
    Class representing a CloudStack Network Interface.
    Nc
                 óˆ   — || _         || _        || _        || _        || _        || _        || _        || _        |	pi | _        d S rÇ   ©	rÐ   rí   Únet_maskr=   Ú
ip_addressÚ
is_defaultÚmac_addressr    r  )
r£   rÐ   rí   r+  r=   r,  r-  r.  r    r  s
             r   rÓ   zCloudStackNic.__init__{  sL   € ð ˆŒØ$ˆŒØ ˆŒØˆŒØ$ˆŒØ$ˆŒØ&ˆÔØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ó’   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d	�S )
Nz<CloudStackNic: id=z, network_id=z, net_mask=ú
, gateway=z, ip_address=z, is_default=z, mac_address=z, driverr  )	rÐ   rí   r+  r=   r,  r-  r.  r    r“   r¢   s    r   r  zCloudStackNic.__repr__‘  s`   € € ð ŒGˆGˆGØŒOˆOˆOØŒMˆMˆMØŒLˆLˆLØŒOˆOˆOØŒOˆOˆOØÔÐÐØŒKÔÐÐð
ð 	
r¤   c                 ó>   — | j         |j         u o| j        |j        k    S rÇ   rÚ   rÜ   s     r   rÞ   zCloudStackNic.__eq__¡  rß   r¤   rÇ   )rÈ   rÉ   rÊ   rË   rÓ   r  rÞ   rÌ   r¤   r   r(  r(  v  sZ   € € € € € ðð ð ð!ð !ð !ð !ð,
ð 
ð 
ð Ið Ið Ið Ið Ir¤   r(  c                   ó&   — e Zd ZdZ	 	 	 dd„Zd„ ZdS )ÚCloudStackVPCz.
    Class representing a CloudStack VPC.
    Nc	                 óz   — || _         || _        || _        || _        || _        || _        || _        |pi | _        d S rÇ   )r!  r“   rf   rÐ   rD   Úcidrr    r  )	r£   r“   rf   rÐ   r5  r    rD   r!  r  s	            r   rÓ   zCloudStackVPC.__init__ª  sF   € ð )ˆÔØˆŒ	Ø.ˆÔØˆŒØˆŒØˆŒ	ØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ó‚   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        j         ›d| j        ›d| j        ›d�S )	Nz<CloudStackVPC: name=z, vpc_offering_id=r  z, cidr=r  z
, zone_id=r&  r  )r“   rf   rÐ   r5  r    rD   r!  r¢   s    r   r  zCloudStackVPC.__repr__¾  sZ   € € ð
 ŒIˆIˆIØÔ Ð Ð ØŒGˆGˆGØŒIˆIˆIØŒKÔÐÐØŒLˆLˆLØÔÐÐð
ð 	
r¤   rà   r	  rÌ   r¤   r   r3  r3  ¥  sL   € € € € € ðð ð ØØð!ð !ð !ð !ð(
ð 
ð 
ð 
ð 
r¤   r3  c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚCloudStackVPCOfferingz7
    Class representing a CloudStack VPC Offering.
    Nc                 óP   — || _         || _        || _        || _        |pi | _        d S rÇ   )r“   r!  rÐ   r    r  )r£   r“   r!  rÐ   r    r  s         r   rÓ   zCloudStackVPCOffering.__init__Ò  s.   € ØˆŒ	Ø(ˆÔØˆŒØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c           	      óR   — d| j         ›d| j        ›d| j        ›d| j        j         ›d�	S )Nz<CloudStackVPCOffering: name=r&  r  r  r  )r“   r!  rÐ   r    r¢   s    r   r  zCloudStackVPCOffering.__repr__Ù  s:   € € àŒIˆIˆIØÔÐÐØŒGˆGˆGØŒKÔÐÐð	
ð 	
r¤   rÇ   r	  rÌ   r¤   r   r8  r8  Í  óA   € € € € € ðð ð!ð !ð !ð !ð
ð 
ð 
ð 
ð 
r¤   r8  c                   ó<   — e Zd ZdZdd„Zed„ ¦   «         Zd„ Zd„ ZdS )ÚCloudStackVpnGatewayz6
    Class representing a CloudStack VPN Gateway.
    Nc	                 óz   — || _         || _        || _        || _        || _        || _        || _        |pi | _        d S rÇ   ©rÐ   rg   rb   re   Ú	public_iprA   r    r  )	r£   rÐ   rg   rb   re   r@  rA   r    r  s	            r   rÓ   zCloudStackVpnGateway.__init__ç  sB   € ØˆŒØˆŒØˆŒØ"ˆŒØ"ˆŒØˆŒØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ó�   — | j                              ¦   «         D ]}| j        |j        k    r|c S Œt	          d| j        z  ¦  «        ‚)NzVPC with id=%s not found)r    Úex_list_vpcsrA   rÐ   r   )r£   r™   s     r   r™   zCloudStackVpnGateway.vpcñ  sT   € à”;×+Ò+Ñ-Ô-ð 	ð 	ˆCØŒ{˜cœfÒ$Ð$Ø�
�
�
ð %õ Ð6¸¼ÑDÑEÔEÐEr¤   c                 ó8   — | j                              | ¬¦  «        S )N)Úvpn_gateway)r    Úex_delete_vpn_gatewayr¢   s    r   rô   zCloudStackVpnGateway.deleteù  s   € ØŒ{×0Ò0¸TÐ0ÑBÔBÐBr¤   c                 ó‚   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )	Nz<CloudStackVpnGateway: account=z	, domain=z, domain_id=r  ú, public_ip=r  r  r  )rg   rb   re   rÐ   r@  rA   r    r“   r¢   s    r   r  zCloudStackVpnGateway.__repr__ü  sT   € € ð ŒLˆLˆLØŒKˆKˆKØŒNˆNˆNØŒGˆGˆGØŒNˆNˆNØŒKˆKˆKØŒKÔÐÐð
ð 	
r¤   rÇ   )	rÈ   rÉ   rÊ   rË   rÓ   Úpropertyr™   rô   r  rÌ   r¤   r   r=  r=  â  sq   € € € € € ðð ð!ð !ð !ð !ð ðFð Fñ „XðFðCð Cð Cð
ð 
ð 
ð 
ð 
r¤   r=  c                   ó(   — e Zd ZdZ	 dd„Zd„ Zd„ ZdS )ÚCloudStackVpnCustomerGatewayz?
    Class representing a CloudStack VPN Customer Gateway.
    Nc	                 óz   — || _         || _        || _        || _        || _        || _        || _        |pi | _        d S rÇ   ©rÐ   rä   Ú
esp_policyr=   Ú
ike_policyÚ	ipsec_pskr    r  )	r£   rÐ   rä   rM  r=   rN  rO  r    r  s	            r   rÓ   z%CloudStackVpnCustomerGateway.__init__  sD   € ð ˆŒØ"ˆŒØ$ˆŒØˆŒØ$ˆŒØ"ˆŒØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 ó8   — | j                              | ¬¦  «        S )N)Úvpn_customer_gateway)r    Úex_delete_vpn_customer_gatewayr¢   s    r   rô   z#CloudStackVpnCustomerGateway.delete%  s   € ØŒ{×9Ò9ÈtÐ9ÑTÔTÐTr¤   c                 ó‚   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )	Nz"<CloudStackVpnCustomerGateway: id=z, cidr_list=z, esp_policy=r0  z, ike_policy=z, ipsec_psk=r  r  )rÐ   rä   rM  r=   rN  rO  r    r“   r¢   s    r   r  z%CloudStackVpnCustomerGateway.__repr__(  sT   € € ð ŒGˆGˆGØŒNˆNˆNØŒOˆOˆOØŒLˆLˆLØŒOˆOˆOØŒNˆNˆNØŒKÔÐÐð
ð 	
r¤   rÇ   )rÈ   rÉ   rÊ   rË   rÓ   rô   r  rÌ   r¤   r   rJ  rJ    sX   € € € € € ðð ð ð!ð !ð !ð !ð(Uð Uð Uð
ð 
ð 
ð 
ð 
r¤   rJ  c                   óT   — e Zd ZdZ	 dd„Zed„ ¦   «         Zed„ ¦   «         Zd„ Zd„ Z	dS )	ÚCloudStackVpnConnectionz9
    Class representing a CloudStack VPN Connection.
    Nc                 ól   — || _         || _        || _        || _        || _        || _        |pi | _        d S rÇ   ©rÐ   ÚpassiveÚvpn_customer_gateway_idÚvpn_gateway_idr/   r    r  )r£   rÐ   rX  rY  rZ  r/   r    r  s           r   rÓ   z CloudStackVpnConnection.__init__=  s?   € ð ˆŒØˆŒØ'>ˆÔ$Ø,ˆÔØˆŒ
ØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c                 óš   — 	 | j                              | j        ¬¦  «        d         S # t          $ r t	          d| j        z  ¦  «        ‚w xY w)N©rÐ   r   z)VPN Customer Gateway with id=%s not found)r    Úex_list_vpn_customer_gatewaysrY  Ú
IndexErrorr   r¢   s    r   rQ  z,CloudStackVpnConnection.vpn_customer_gatewayO  sa   € ð	Ø”;×<Ò<ÀÔ@\Ð<Ñ]Ô]Ð^_Ô`Ð`øÝð 	ð 	ð 	ÝØ;¸dÔ>ZÑZñô ð ð	øøøó	   ‚%( ¨"A
c                 óš   — 	 | j                              | j        ¬¦  «        d         S # t          $ r t	          d| j        z  ¦  «        ‚w xY w)Nr\  r   z VPN Gateway with id=%s not found)r    Úex_list_vpn_gatewaysrZ  r^  r   r¢   s    r   rD  z#CloudStackVpnConnection.vpn_gatewayX  s_   € ð	ZØ”;×3Ò3°tÔ7JÐ3ÑKÔKÈAÔNÐNøÝð 	Zð 	Zð 	ZÝÐ BÀTÔEXÑ XÑYÔYÐYð	Zøøør_  c                 ó8   — | j                              | ¬¦  «        S )N)Úvpn_connection)r    Úex_delete_vpn_connectionr¢   s    r   rô   zCloudStackVpnConnection.delete_  s   € ØŒ{×3Ò3À4Ð3ÑHÔHÐHr¤   c                 ór   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )Nz<CloudStackVpnConnection: id=z
, passive=z, vpn_customer_gateway_id=z, vpn_gateway_id=ú, state=r  r  )rÐ   rX  rY  rZ  r/   r    r“   r¢   s    r   r  z CloudStackVpnConnection.__repr__b  sQ   € € ð ŒGˆGˆGØŒLˆLˆLØÔ(Ð(Ð(ØÔÐÐØŒJˆJˆJØŒKÔÐÐð
ð 	
r¤   rÇ   )
rÈ   rÉ   rÊ   rË   rÓ   rH  rQ  rD  rô   r  rÌ   r¤   r   rU  rU  8  s‘   € € € € € ðð ð ð!ð !ð !ð !ð$ ðð ñ „Xðð ðZð Zñ „XðZðIð Ið Ið
ð 
ð 
ð 
ð 
r¤   rU  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚCloudStackRouterz1
    Class representing a CloudStack Router.
    c                 óZ   — || _         || _        || _        || _        || _        || _        d S rÇ   ©rÐ   r“   r/   r@  rA   r    )r£   rÐ   r“   r/   r@  rA   r    s          r   rÓ   zCloudStackRouter.__init__v  s0   € ØˆŒØˆŒ	ØˆŒ
Ø"ˆŒØˆŒØˆŒˆˆr¤   c                 ór   — d| j         ›d| j        ›d| j        ›d| j        ›d| j        ›d| j        j        ›d�S )Nz<CloudStackRouter: id=r  rf  rG  r  r  r  rj  r¢   s    r   r  zCloudStackRouter.__repr__~  sK   € € ð ŒGˆGˆGØŒIˆIˆIØŒJˆJˆJØŒNˆNˆNØŒKˆKˆKØŒKÔÐÐð	
ð 		
r¤   Nr	  rÌ   r¤   r   rh  rh  q  s<   € € € € € ðð ðð ð ð

ð 

ð 

ð 

ð 

r¤   rh  c                   ó    — e Zd ZdZdd„Zd„ ZdS )ÚCloudStackProjectz2
    Class representing a CloudStack Project.
    Nc                 óP   — || _         || _        || _        || _        |pi | _        d S rÇ   ©rÐ   r“   r!  r    r  )r£   rÐ   r“   r!  r    r  s         r   rÓ   zCloudStackProject.__init__�  s.   € ØˆŒØˆŒ	Ø(ˆÔØˆŒØ�[˜bˆŒ
ˆ
ˆ
r¤   c           	      óR   — d| j         ›d| j        ›d| j        ›d| j        j        ›d�	S )Nz<CloudStackProject: id=r  r&  z,driver=r  )rÐ   r!  r“   r    r¢   s    r   r  zCloudStackProject.__repr__—  s:   € € àŒGˆGˆGØÔÐÐØŒIˆIˆIØŒKÔÐÐð	
ð 	
r¤   rÇ   r	  rÌ   r¤   r   rm  rm  ‹  r;  r¤   rm  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚCloudStackAffinityGroupz8
    Class representing a CloudStack AffinityGroup.
    c	                 óv   — || _         || _        || _        || _        || _        || _        || _        || _        dS )aÆ  
        A CloudStack Affinity Group.

        @note: This is a non-standard extension API, and only works for
               CloudStack.

        :param      id: CloudStack Affinity Group ID
        :type       id: ``str``

        :param      account: An account for the affinity group. Must be used
                             with domainId.
        :type       account: ``str``

        :param      description: optional description of the affinity group
        :type       description: ``str``

        :param      domain: the domain name of the affinity group
        :type       domain: ``str``

        :param      domainid: domain ID of the account owning the affinity
                              group
        :type       domainid: ``str``

        :param      name: name of the affinity group
        :type       name: ``str``

        :param      group_type: the type of the affinity group
        :type       group_type: :class:`CloudStackAffinityGroupType`

        :param      virtualmachine_ids: virtual machine Ids associated with
                                        this affinity group
        :type       virtualmachine_ids: ``str``

        :rtype:     :class:`CloudStackAffinityGroup`
        N)rÐ   rg   r  rb   rc   r“   r2   Úvirtualmachine_ids)	r£   rÐ   rg   r  rb   rc   r“   Ú
group_typert  s	            r   rÓ   z CloudStackAffinityGroup.__init__¥  sE   € ð\ ˆŒØˆŒØ&ˆÔØˆŒØ ˆŒØˆŒ	ØˆŒ	Ø"4ˆÔÐÐr¤   c                 ó8   — d| j         ›d| j        ›d| j        ›d�S )Nz<CloudStackAffinityGroup: id=r  z, type=r  )rÐ   r“   r2   r¢   s    r   r  z CloudStackAffinityGroup.__repr__Ü  s)   € € àŒGˆGˆGØŒIˆIˆIØŒIˆIˆIð
ð 	
r¤   Nr	  rÌ   r¤   r   rr  rr     s=   € € € € € ðð ð55ð 55ð 55ðn
ð 
ð 
ð 
ð 
r¤   rr  c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚCloudStackAffinityGroupTypez<
    Class representing a CloudStack AffinityGroupType.
    c                 ó   — || _         dS )a3  
        A CloudStack Affinity Group Type.

        @note: This is a non-standard extension API, and only works for
               CloudStack.

        :param      type_name: the type of the affinity group
        :type       type_name: ``str``

        :rtype: :class:`CloudStackAffinityGroupType`
        N©r2   )r£   Ú	type_names     r   rÓ   z$CloudStackAffinityGroupType.__init__é  s   € ð ˆŒ	ˆ	ˆ	r¤   c                 ó   — d| j         z  S )Nz&<CloudStackAffinityGroupType: type=%s>rz  r¢   s    r   r  z$CloudStackAffinityGroupType.__repr__÷  s   € Ø8¸D¼IÑEÐEr¤   Nr	  rÌ   r¤   r   rx  rx  ä  sA   € € € € € ðð ðð ð ðFð Fð Fð Fð Fr¤   rx  c                   ó®  ‡ — e Zd ZdZdZdZdZej        Z	ddgiZ
ej        ej        ej        ej        ej        ej        ej        ej        dœZej        ej        ej        ej        ej        ej        ej        ej        ej        ej        dœ
Z	 	 	 	 	 	 dpˆ fd„	Zdqd„Zd„ Zdrd„Zdqd„Zdqd„Z 	 	 	 	 	 	 	 	 	 	 	 	 dsd„Z!	 	 	 	 	 	 	 	 	 	 	 	 dsd„Z"dtd„Z#d„ Z$dqd„Z%d„ Z&d„ Z'd„ Z(d„ Z)dqd„Z*d„ Z+	 	 	 	 	 dud„Z,dqd„Z-d„ Z.dqd „Z/dqd!„Z0dqd"„Z1d#„ Z2d$„ Z3dvd%„Z4d&„ Z5dqd'„Z6d(„ Z7dqd)„Z8dqd*„Z9d+„ Z:d,„ Z;d-„ Z<d.„ Z=d/„ Z>d0„ Z?dvd1„Z@d2„ ZAd3„ ZB	 	 	 	 dwd4„ZCd5„ ZDd6„ ZE	 	 	 	 dwd7„ZFd8„ ZG	 	 	 	 	 	 	 	 	 	 	 dxd9„ZH	 	 	 	 dyd:„ZId;„ ZJ	 	 	 	 	 	 	 	 	 	 	 dxd<„ZKdqd=„ZLd>„ ZMdqd?„ZN	 	 drd@„ZOdA„ ZPdB„ ZQdC„ ZRdD„ ZSdE„ ZTdF„ ZUdG„ ZVdH„ ZWdI„ ZXdJ„ ZYdK„ ZZ	 	 	 	 dwdL„Z[dM„ Z\dN„ Z]dO„ Z^dP„ Z_dQ„ Z`dR„ ZadqdS„ZbdT„ ZcdU„ ZddV„ ZedW„ ZfdqdX„ZgdY„ ZhdqdZ„Zid[„ Zjd\„ Zkdqd]„Zld^„ Zm	 	 	 	 	 	 	 	 	 	 	 dxd_„Zndqd`„Zoda„ Zp	 	 	 	 	 	 	 	 	 dzdb„Zq	 	 	 	 	 	 d{dc„Zrdd„ Zs	 	 	 	 	 	 	 	 	 	 	 dxde„Zt	 drdf„Zudg„ Zvdh„ Zwdqdi„Zxdj„ Zydk„ Zzdl„ Z{dm„ Z|dn„ Z}do„ Z~ˆ xZS )|ÚCloudStackNodeDrivera3  
    Driver for the CloudStack API.

    :cvar host: The host where the API can be reached.
    :cvar path: The path where the API can be reached.
    :cvar async_poll_frequency: How often (in seconds) to poll for async
                                job completion.
    :type async_poll_frequency: ``int``Ú
CloudStackÚ
cloudstackzhttp://cloudstack.org/Úcreate_nodeÚgenerates_password)ÚRunningÚStartingÚ	MigratingÚStoppedÚStoppingÚ	DestroyedÚ	ExpungingÚError)
ÚCreatingÚ
Destroyingr‰  ÚDestroyÚExpungedÚ	AllocatedÚReadyÚSnapshottingÚUploadErrorr…  NTc                 óö  •— |rt          j         |¦  «        }
|
j        }|
j        }|
j                             d¦  «        }t          |¦  «        dk    r|
j        }|dk    rdnd}n4|d         }t          |d         ¦  «        }n|r|n| j        }|r|n| j        }|�|| _        |�|| _        | j        t          j
        k    r|r|st          d¦  «        ‚t          ¦   «                              |||||¬	¦  «         dS )
a¡  
        :inherits: :class:`NodeDriver.__init__`

        :param    host: The host where the API can be reached. (required)
        :type     host: ``str``

        :param    path: The path where the API can be reached. (required)
        :type     path: ``str``

        :param url: Full URL to the API endpoint. Mutually exclusive with host
                    and path argument.
        :type url: ``str``
        ú:é   Úhttpsi»  éP   r   NzdWhen instantiating CloudStack driver directly you also need to provide url or host and path argument)ÚkeyÚsecretÚsecureÚhostÚport)r   ÚpathÚschemeÚnetlocÚsplitÚlenr   r›  r2   r   Ú
CLOUDSTACKÚ	ExceptionÚsuperrÓ   )r£   r˜  r™  rš  r›  r�  rœ  ÚurlÚargsÚkwargsÚparsedrž  r   rÛ   s                €r   rÓ   zCloudStackNodeDriver.__init__$  s  ø€ ð2 ð 	/ÝÔ& sÑ+Ô+ˆFà”;ˆDà”]ˆFØ”M×'Ò'¨Ñ,Ô,ˆEå�5‰zŒz˜QŠˆà”}�Ø$¨Ò/Ð/�s�s°R��à˜Q”x�Ý˜5 œ8‘}”}��àÐ.�4�4 T¤YˆDØÐ.�4�4 T¤YˆDàÐØˆDŒIàÐØˆDŒIàŒI�Ô,Ò,Ð,°tÐ,À4Ð,Ýðñô ð õ 	‰Œ×Ò˜S¨¸ÀTÐPTÐÑUÔUÐUÐUÐUr¤   c           	      ó¬  — ddi}|�
|j         |d<   |                      d|d¬¦  «        }g }|                     dg ¦  «        D ]’}|d         |d	         |d
         |d         dœ}|                     dd ¦  «        }|�|                     d|d         i¦  «         |                     t          |d         |d         | j        j        |¬¦  «        ¦  «         Œ“|S )NÚtemplatefilterÚ
executablerE   ÚlistTemplatesÚGET©ÚcommandÚparamsÚmethodr½   rX   ÚformatÚ
ostypenamer  ©rX   r²  Úosr  r  rÐ   r“   ©rÐ   r“   r    r  )rÐ   Ú_sync_requestÚgetÚupdateÚappendr   Ú
connectionr    )r£   Úlocationr¦  ÚimgsÚimagesÚimgr  r  s           r   Úlist_imagesz CloudStackNodeDriver.list_images_  s  € Ø  ,Ð/ˆØÐØ%œ[ˆD�‰Nà×!Ò!¨/À$ÈuÐ!ÑUÔUˆØˆØ—8’8˜J¨Ñ+Ô+ð 	ð 	ˆCà! ,Ô/Ø˜hœ-Ø˜,Ô'Ø" =Ô1ð	ð ˆEð —7’7˜6 4Ñ(Ô(ˆDØÐØ—’˜f c¨&¤kÐ2Ñ3Ô3Ð3à�MŠMÝØ˜4”yØ˜VœØœ?Ô1Øð	ñ ô ñô ð ð ð ˆr¤   c                 óÊ   — |                       d¦  «        }g }|d         D ]B}t          t          |d         ¦  «        |d         d| ¦  «        }|                     |¦  «         ŒC|S )z:
        :rtype ``list`` of :class:`NodeLocation`
        Ú	listZonesÚzonerÐ   r“   ÚUnknown)r·  r
   r   rº  )r£   ÚlocsÚ	locationsÚlocr¼  s        r   Úlist_locationsz#CloudStackNodeDriver.list_locations|  sm   € ð ×!Ò! +Ñ.Ô.ˆàˆ	Ø˜”<ð 	'ð 	'ˆCÝ#¥C¨¨D¬	¡N¤N°C¸´KÀÈDÑQÔQˆHØ×Ò˜XÑ&Ô&Ð&Ð&àÐr¤   c                 ó¦  ‡‡— i }|r
|j         |d<   |�
|j         |d<   |                      d|¬¦  «        }|                      d|¬¦  «        }|                      d¦  «        }|                      d¦  «        }i }|                     d	g ¦  «        D ]<}	d
|	vrŒt          |	d
         ¦  «        }
|
|vri ||
<   |	d         ||
         |	d         <   Œ=g }|                     dg ¦  «        D �]m}|                     t          |d         ¦  «        i ¦  «                             ¦   «         }t          |¦  «        }|                      ||¬¦  «        Š|                     t          |d         ¦  «        i ¦  «                             ¦   «         }ˆfd„|D ¦   «         }|‰j        d<   g }|D ]Œ}	|                     dg ¦  «        D ]sŠt          ‰d
         ¦  «        ‰j         k    rSt          ‰‰d         |	‰d          
                    ¦   «         ‰d         ‰d         ¦  «        }|                     |¦  «         ŒtŒ�|‰j        d<   g }|                     dg ¦  «        D ]ãŠt          ‰d
         ¦  «        ‰j         k    rÃˆˆfd„|                     d	g ¦  «        D ¦   «         }	t          ‰‰d         |	d         ‰d          
                    ¦   «         ‰d         ‰d         ‰d         ‰d         ¦  «        }|	d         j        ‰j        vr%‰j                             |	d         j        ¦  «         |                     |¦  «         Œä|‰j        d<   |                     ‰¦  «         �Œo|S )aÑ  
        @inherits: :class:`NodeDriver.list_nodes`

        :keyword    project: Limit nodes returned to those configured under
                             the defined project.
        :type       project: :class:`.CloudStackProject`

        :keyword    location: Limit nodes returned to those in the defined
                              location.
        :type       location: :class:`.NodeLocation`

        :rtype: ``list`` of :class:`CloudStackNode`
        r@   NrE   ÚlistVirtualMachines©r°  ÚlistPublicIpAddressesÚlistPortForwardingRulesÚlistIpForwardingRulesÚpublicipaddressr]   rÐ   Ú	ipaddressÚvirtualmachine©ÚdataÚ
public_ipsc                 óD   •— g | ]\  }}t          ||‰j        ¬ ¦  «        ‘ŒS ©©rÐ   r¨   r    ©rÎ   r    ©Ú.0r¨   Ú
address_idr—   s      €r   ú
<listcomp>z3CloudStackNodeDriver.list_nodes.<locals>.<listcomp>¶  s>   ø€ ð ð ð á'�G˜Zõ " Z¸ÈÌÐUÑUÔUðð ð r¤   Úip_addressesÚipforwardingrulerª   Ú	startportÚendportÚip_forwarding_rulesÚportforwardingrulec                 óz   •— g | ]7}|d          ‰d          k    ¯t          |d         |d          ‰j        ¬¦  «        ‘Œ8S )rÐ  rÐ   r×  rØ  )rÚ  Úar—   Úrs     €€r   rÜ  z3CloudStackNodeDriver.list_nodes.<locals>.<listcomp>Î  sQ   ø€ ð ð ð àØ˜[œ>¨Q¨{¬^Ò;Ð;õ *¨Q¨t¬W¸aÀ¼nÐUYÔU`ÐaÑaÔaà;Ð;Ð;r¤   r   Ú
publicportÚprivateportÚpublicendportÚprivateendportÚport_forwarding_rules)rÐ   r·  r¸  r   ÚkeysÚlistÚ_to_nodeÚitemsr  rð   Úupperrº  rø   r¨   rÔ  )r£   rY   r¼  r¦  ÚvmsÚaddrsrê  rá  Úpublic_ips_mapÚaddrÚvm_idÚnodesÚvmrÔ  Ú	addressesÚrulesr·   r—   rå  s                    @@r   Ú
list_nodeszCloudStackNodeDriver.list_nodes‰  sÄ  øø€ ð ˆàð 	+Ø '¤
ˆD�ÑàÐØ%œ[ˆD�‰Nà× Ò Ð!6¸tÐ ÑDÔDˆØ×"Ò"Ð#:À4Ð"ÑHÔHˆØ $× 2Ò 2Ð3LÑ MÔ MÐØ"×0Ò0Ð1HÑIÔIÐàˆØ—I’IÐ/°Ñ4Ô4ð 	Bð 	BˆDØ!¨Ð-Ð-ØÝ˜Ð/Ô0Ñ1Ô1ˆEØ˜NÐ*Ð*Ø(*�˜uÑ%Ø7;¸D´zˆN˜5Ô! $ {Ô"3Ñ4Ð4àˆà—'’'Ð*¨BÑ/Ô/ð 2	ñ 2	ˆBØ'×+Ò+­C°°4´©M¬M¸2Ñ>Ô>×CÒCÑEÔEˆJÝ˜jÑ)Ô)ˆJØ—=’= b°Z�=Ñ@Ô@ˆDà&×*Ò*­3¨r°$¬x©=¬=¸"Ñ=Ô=×CÒCÑEÔEˆIðð ð ð à+4ðñ ô ˆIð *3ˆDŒJ�~Ñ&àˆEØ!ð +ð +�Ø,×0Ò0Ð1CÀRÑHÔHð 
+ð 
+�AÝ˜1Ð/Ô0Ñ1Ô1°T´WÒ<Ð<Ý9Ø Ø˜dœGØ Ø˜jœM×/Ò/Ñ1Ô1Ø˜kœNØ˜iœLñ ô  ˜ð Ÿš TÑ*Ô*Ð*øð
+ð 16ˆDŒJÐ,Ñ-àˆEØ*×.Ò.Ð/CÀRÑHÔHð 'ð '�Ý�qÐ+Ô,Ñ-Ô-°´Ò8Ð8ðð ð ð ð à!&§¢Ð+<¸bÑ!AÔ!Aðñ ô �Dõ
 8ØØ˜$œØ˜QœØ˜*œ×+Ò+Ñ-Ô-Ø˜,œØ˜-Ô(Ø˜/Ô*ØÐ*Ô+ñ	ô 	�Dð   œ7œ?¨d¬oÐ=Ð=Øœ×.Ò.¨t°A¬w¬Ñ?Ô?Ð?Ø—L’L Ñ&Ô&Ð&øØ27ˆDŒJÐ.Ñ/à�LŠL˜ÑÔÐÑàˆr¤   c                 ó¨  ‡‡— d|i}i }|r|j         |d<   |j         |d<   |                      d|¬¦  «        }|st          d|z  ¦  «        ‚|d         d         }|                      d|¬¦  «        }i }|                     d	g ¦  «        D ]}	d
|	vrŒ|	d         ||	d         <   Œ|                      |t          |                     ¦   «         ¦  «        ¬¦  «        Šˆfd„|                     ¦   «         D ¦   «         }
|
‰j        d<   g }d
|i}|
D ]£}	|                      d|¬¦  «        }|                     dg ¦  «        D ]sŠt          ‰d
         ¦  «        ‰j         k    rSt          ‰‰d         |	‰d                              ¦   «         ‰d         ‰d         ¦  «        }|                     |¦  «         ŒtŒ¤|‰j        d<   g }|                      ¦   «         }|                      d|¬¦  «        }|                     dg ¦  «        D ]ÎŠt          ‰d
         ¦  «        ‰j         k    r®ˆfd„|D ¦   «         }	t          ‰‰d         |	d         ‰d                              ¦   «         ‰d         ‰d         ‰d         ‰d         ¦  «        }|	d         j        ‰j        vr%‰j                             |	d         j        ¦  «         |                     |¦  «         ŒÏ|‰j        d<   ‰S )ae  
        Return a Node object based on its ID.

        :param  node_id: The id of the node
        :type   node_id: ``str``

        :keyword    project: Limit node returned to those configured under
                             the defined project.
        :type       project: :class:`.CloudStackProject`

        :rtype: :class:`CloudStackNode`
        rÐ   r@   rÊ  rË  zNode '%s' not foundrÑ  r   rÌ  rÏ  r]   rÐ  rÒ  c                 óD   •— g | ]\  }}t          ||‰j        ¬ ¦  «        ‘ŒS rÖ  rØ  rÙ  s      €r   rÜ  z4CloudStackNodeDriver.ex_get_node.<locals>.<listcomp>  s>   ø€ ð 
ð 
ð 
á#�˜õ  °WÀTÄ[ÐQÑQÔQð
ð 
ð 
r¤   rÝ  rÎ  rÞ  rª   rß  rà  rá  rÍ  râ  c                 ó6   •— g | ]}|j         ‰d          k    ¯|‘ŒS ©rÐ  rÕ   )rÚ  rä  rå  s     €r   rÜ  z4CloudStackNodeDriver.ex_get_node.<locals>.<listcomp>"  s)   ø€ ÐMÐMÐM˜a°´¸aÀ¼nÒ1LÐ1L˜Ð1LÐ1LÐ1Lr¤   ræ  rç  rè  ré  rê  )rÐ   r·  r£  r¸  rí  rì  rë  rî  r  r   rð   rï  rº  Úex_list_public_ipsrø   r¨   rÔ  )r£   Únode_idrY   Úlist_nodes_argsÚlist_ips_argsrð  rö  rñ  rÔ  ró  r÷  rø  Úlist_fw_rulesÚresultr·   r—   rå  s                  @@r   Úex_get_nodez CloudStackNodeDriver.ex_get_nodeæ  sB  øø€ ð   ˜/ˆØˆØð 	4Ø+2¬:ˆO˜KÑ(Ø)0¬ˆM˜+Ñ&Ø× Ò Ð!6¸Ð ÑOÔOˆØð 	=ÝÐ1°GÑ;Ñ<Ô<Ð<ØÐ!Ô" 1Ô%ˆØ×"Ò"Ð#:À=Ð"ÑQÔQˆàˆ
Ø—I’IÐ/°Ñ4Ô4ð 	7ð 	7ˆDØ!¨Ð-Ð-ØØ,0°¬JˆJ�t˜KÔ(Ñ)Ð)à�}Š} "µ°j·o²oÑ6GÔ6GÑ1HÔ1Hˆ}ÑIÔIˆð
ð 
ð 
ð 
à'1×'7Ò'7Ñ'9Ô'9ð
ñ 
ô 
ˆ	ð &/ˆŒ
�>Ñ"àˆØ+¨WÐ5ˆØð 	'ð 	'ˆDØ×'Ò'Ð(?ÈÐ'ÑVÔVˆFØ—Z’ZÐ 2°BÑ7Ô7ð 
'ð 
'�Ý�qÐ+Ô,Ñ-Ô-°´Ò8Ð8Ý5ØØ˜$œØØ˜*œ×+Ò+Ñ-Ô-Ø˜+œØ˜)œñô �Dð —L’L Ñ&Ô&Ð&øð
'ð -2ˆŒ
Ð(Ñ)àˆØ×,Ò,Ñ.Ô.ˆ
Ø×#Ò#Ð$=ÀmÐ#ÑTÔTˆØ—’Ð0°"Ñ5Ô5ð 	#ð 	#ˆAÝ�1Ð'Ô(Ñ)Ô)¨T¬WÒ4Ð4ØMÐMÐMÐM :ÐMÑMÔM�Ý3ØØ�d”GØ˜”GØ�j”M×'Ò'Ñ)Ô)Ø�l”OØ�mÔ$Ø�oÔ&ØÐ&Ô'ñ	ô 	�ð ˜A”w”¨$¬/Ð9Ð9Ø”O×*Ò*¨4°¬7¬?Ñ;Ô;Ð;Ø—’˜TÑ"Ô"Ð"øØ.3ˆŒ
Ð*Ñ+Øˆr¤   c                 óÚ   — |                       dd¬¦  «        }g }|d         D ]H}d|d         i}|                     t          |d         |d         |d	         d
d
d
| |¬¦  «        ¦  «         ŒI|S )z6
        :rtype ``list`` of :class:`NodeSize`
        ÚlistServiceOfferingsr­  ©r¯  r±  ÚserviceofferingÚcpuÚ	cpunumberrÐ   r“   Úmemoryr   ©r  )r·  rº  r   )r£   r¼  ÚszsÚsizesÚszr  s         r   Ú
list_sizeszCloudStackNodeDriver.list_sizes3  s‡   € ð × Ò Ð)?ÈÐ ÑNÔNˆØˆØÐ'Ô(ð 	cð 	cˆBØ˜B˜{œOÐ,ˆEØ�LŠL� " T¤(¨B¨v¬J¸¸8¼ÀaÈÈAÈtÐ[`ÐaÑaÔaÑbÔbÐbÐbØˆr¤   Fc                 ó¶   — |                       d||||||||	|
|||||¬¦  «        }|                      d|d¬¦  «        d         }|                      |¬¦  «        }|S )am  
        Create a new node

        @inherits: :class:`NodeDriver.create_node`

        :keyword    networks: Optional list of networks to launch the server
                              into.
        :type       networks: ``list`` of :class:`.CloudStackNetwork`

        :keyword    project: Optional project to create the new node under.
        :type       project: :class:`.CloudStackProject`

        :keyword    diskoffering:  Optional disk offering to add to the new
                                   node.
        :type       diskoffering:  :class:`.CloudStackDiskOffering`

        :keyword    ex_keyname:  Name of existing keypair
        :type       ex_keyname:  ``str``

        :keyword    ex_userdata: String containing user data
        :type       ex_userdata: ``str``

        :keyword    ex_security_groups: List of security groups to assign to
                                        the node
        :type       ex_security_groups: ``list`` of ``str``

        :keyword    ex_displayname: String containing instance display name
        :type       ex_displayname: ``str``

        :keyword    ex_ip_address: String with ipaddress for the default nic
        :type       ex_ip_address: ``str``

        :keyword    ex_start_vm: Boolean to specify to start VM after creation
                                 Default Cloudstack behaviour is to start a VM,
                                 if not specified.

        :type       ex_start_vm: ``bool``

        :keyword    ex_rootdisksize: String with rootdisksize for the template
        :type       ex_rootdisksize: ``str``

        :keyword    ex_affinity_groups: List of affinity groups to assign to
                                        the node
        :type       ex_affinity_groups: ``list`` of
                                        :class:`.CloudStackAffinityGroup`

        :rtype:     :class:`.CloudStackNode`
        N)r—   r“   r  Úimager¼  ÚnetworksÚdiskofferingÚ
ex_keynameÚex_userdataÚex_security_groupsÚex_displaynameÚex_ip_addressÚex_start_vmÚex_rootdisksizeÚex_affinity_groupsÚdeployVirtualMachiner­  r®  rÑ  ©rÓ  )Ú_create_args_to_paramsÚ_async_requestrí  )r£   r“   r  r  r¼  r  rY   r  r  r  r  r  r  r  r  r  Úserver_paramsrÓ  r—   s                      r   r�  z CloudStackNodeDriver.create_node>  s‘   € ðF ×3Ò3ØØØØØØØ%Ø!Ø#Ø1Ø)Ø'Ø#Ø+Ø1ð 4ñ 
ô 
ˆð$ ×"Ò"Ø*°=Èð #ñ 
ô 
à
ôˆð �}Š} $ˆ}Ñ'Ô'ˆØˆr¤   c                 ób  — i }|r||d<   |r||d<   |r
|j         |d<   |r
|j         |d<   |r|j         |d<   n"|                      ¦   «         d         j         |d<   |r$d                     d„ |D ¦   «         ¦  «        }||d	<   |r
|j         |d
<   |r
|j         |d<   |	r|	|d<   |
r9t          j        t          |
¦  «        ¦  «                             d¦  «        }
|
|d<   |rd                     |¦  «        }||d<   |r||d<   |r||d<   |�||d<   |r$d                     d„ |D ¦   «         ¦  «        }||d<   |S )Nr“   ÚdisplaynamerQ   rI   rE   r   ú,c                 ó6   — g | ]}t          |j        ¦  «        ‘ŒS rÌ   )r   rÐ   )rÚ  r–   s     r   rÜ  z?CloudStackNodeDriver._create_args_to_params.<locals>.<listcomp>Á  s    € Ð IÐ IÐ I°W¥ W¤Z¡¤Ð IÐ IÐ Ir¤   Ú
networkidsr@   ÚdiskofferingidrF   ÚasciiÚuserdataÚsecuritygroupnamesrÐ  ÚrootdisksizeÚstartvmc              3   ó$   K  — | ]}|j         V — Œd S rÇ   r\  ©rÚ  Úags     r   ú	<genexpr>z>CloudStackNodeDriver._create_args_to_params.<locals>.<genexpr>ß  s$   è è € Ð)MÐ)M°B¨"¬%Ð)MÐ)MÐ)MÐ)MÐ)MÐ)Mr¤   Úaffinitygroupids)rÐ   rÈ  ÚjoinÚbase64Ú	b64encoder   Údecode)r£   r—   r“   r  r  r¼  r  rY   r  r  r  r  r  r  r  r  r  r!  Úaffinity_group_idss                      r   r  z+CloudStackNodeDriver._create_args_to_params™  sÈ  € ð& ˆàð 	)Ø$(ˆM˜&Ñ!àð 	:Ø+9ˆM˜-Ñ(àð 	9Ø15´ˆMÐ-Ñ.àð 	3Ø*/¬(ˆM˜,Ñ'àð 	BØ&.¤kˆM˜(Ñ#Ð#ð '+×&9Ò&9Ñ&;Ô&;¸AÔ&>Ô&AˆM˜(Ñ#àð 	3Ø—x’xÐ IÐ IÀÐ IÑ IÔ IÑJÔJˆHØ*2ˆM˜,Ñ'àð 	4Ø)0¬ˆM˜+Ñ&àð 	>Ø.:¬oˆMÐ*Ñ+àð 	2Ø'1ˆM˜)Ñ$àð 	4Ý Ô*­1¨[©>¬>Ñ:Ô:×AÒAÀ'ÑJÔJˆKØ(3ˆM˜*Ñ%àð 	EØ!$§¢Ð*<Ñ!=Ô!=ÐØ2DˆMÐ.Ñ/àð 	7Ø)6ˆM˜+Ñ&àð 	<Ø,;ˆM˜.Ñ)àÐ"Ø'2ˆM˜)Ñ$àð 	CØ!$§¢Ð)MÐ)MÐ:LÐ)MÑ)MÔ)MÑ!MÔ!MÐØ0BˆMÐ,Ñ-àÐr¤   c                 óV   — d|j         i}|r||d<   |                      d|d¬¦  «         dS )a1  
        @inherits: :class:`NodeDriver.reboot_node`
        :type node: :class:`CloudStackNode`

        :keyword    ex_expunge: If true is passed, the vm is expunged
                                immediately. False by default.
        :type       ex_expunge: ``bool``

        :rtype: ``bool``
        rÐ   ÚexpungeÚdestroyVirtualMachiner­  r®  T©rÐ   r   )r£   r—   Ú
ex_expunger¦  s       r   Údestroy_nodez!CloudStackNodeDriver.destroy_nodeä  sG   € ð �$”'ð
ˆð ð 	)Ø(ˆD�‰Oà×ÒÐ$;ÀDÐQVÐÑWÔWÐWØˆtr¤   c                 óD   — |                       dd|j        id¬¦  «         dS )z‚
        @inherits: :class:`NodeDriver.reboot_node`
        :type node: :class:`CloudStackNode`

        :rtype: ``bool``
        ÚrebootVirtualMachinerÐ   r­  r®  T©r   rÐ   )r£   r—   s     r   Úreboot_nodez CloudStackNodeDriver.reboot_nodeú  s,   € ð 	×ÒÐ$:ÀDÈ$Ì'À?Ð[`ÐÑaÔaÐaØˆtr¤   c                 óx   — d|j         i}|r
|j         |d<   |                      d|d¬¦  «        }|d         d         S )zï
        Restore virtual machine

        :param node: Node to restore
        :type node: :class:`CloudStackNode`

        :param template: Optional new template
        :type  template: :class:`NodeImage`

        :rtype ``str``
        r]   rI   ÚrestoreVirtualMachiner­  r®  rÑ  r:  )r£   r—   r½   r°  Úress        r   r¾   zCloudStackNodeDriver.ex_restore  sQ   € ð % d¤gÐ.ˆØð 	/Ø#+¤;ˆF�<Ñ à×!Ò!Ð*AÈ&ÐY^Ð!Ñ_Ô_ˆØÐ#Ô$ \Ô2Ð2r¤   c                 óh   — |                       d|j        |j        dœd¬¦  «        }|d         d         S )zÿ
        Change offering/size of a virtual machine

        :param node: Node to change size
        :type node: :class:`CloudStackNode`

        :param offering: The new offering
        :type  offering: :class:`NodeSize`

        :rtype ``str``
        ÚscaleVirtualMachine)rÐ   rQ   r­  r®  rÑ  rQ   r?  )r£   r—   rÀ   rC  s       r   rÁ   z(CloudStackNodeDriver.ex_change_node_size  sG   € ð ×!Ò!Ø)Øœ'¸¼ÐDÐDØð "ñ 
ô 
ˆð
 Ð#Ô$Ð%8Ô9Ð9r¤   c                 ó\   — |                       dd|j        id¬¦  «        }|d         d         S )au  
        Starts/Resumes a stopped virtual machine

        :type node: :class:`CloudStackNode`

        :param id: The ID of the virtual machine (required)
        :type  id: ``str``

        :param hostid: destination Host ID to deploy the VM to
                       parameter available for root admin only
        :type  hostid: ``str``

        :rtype ``str``
        ÚstartVirtualMachinerÐ   r­  r®  rÑ  r/   r?  ©r£   r—   rC  s      r   rÄ   zCloudStackNodeDriver.ex_start*  s>   € ð ×!Ò!Ø)°4¸¼°/È%ð "ñ 
ô 
ˆð Ð#Ô$ WÔ-Ð-r¤   c                 ó\   — |                       dd|j        id¬¦  «        }|d         d         S )z£
        Stops/Suspends a running virtual machine

        :param node: Node to stop.
        :type node: :class:`CloudStackNode`

        :rtype: ``str``
        ÚstopVirtualMachinerÐ   r­  r®  rÑ  r/   r?  rH  s      r   rÆ   zCloudStackNodeDriver.ex_stop>  s>   € ð ×!Ò!Ø(°$¸¼°Èð "ñ 
ô 
ˆð Ð#Ô$ WÔ-Ð-r¤   c           
      óæ   — g }|                       dd¬¦  «        }|                     dd¦  «        D ]@}|                     t          |d         |d         |d         |d	         ¬
¦  «        ¦  «         ŒA|S )z|
        Fetch a list of all available disk offerings.

        :rtype: ``list`` of :class:`CloudStackDiskOffering`
        ÚlistDiskOfferingsr­  r  r  rÌ   rÐ   r“   ÚdisksizeÚiscustomizedr  )r·  r¸  rº  r  )r£   ÚdiskOfferingsÚdiskOfferResponseÚdiskOfferDicts       r   Úex_list_disk_offeringsz+CloudStackNodeDriver.ex_list_disk_offeringsL  sš   € ð ˆà ×.Ò.Ð7JÐSXÐ.ÑYÔYÐØ.×2Ò2°>À2ÑFÔFð 	ð 	ˆMØ× Ò Ý&Ø$ TÔ*Ø& vÔ.Ø& zÔ2Ø!.¨~Ô!>ð	ñ ô ñô ð ð ð Ðr¤   c                 ó¤  — i }|�
|j         |d<   |                      d|d¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]�}|                      ||¦  «        }d|v r|                      |d         ¦  «        |d<   |                     t          |d         |d	         |d
         |d         |d         | |¬¦  «        ¦  «         Œ‚|S )zÝ
        List the available networks

        :param  project: Optional project the networks belongs to.
        :type   project: :class:`.CloudStackProject`

        :rtype ``list`` of :class:`CloudStackNetwork`
        Nr@   ÚlistNetworksr­  r®  r–   r}   r  r“   r  rÐ   rE   r  )rÐ   r·  r¸  ÚRESOURCE_EXTRA_ATTRIBUTES_MAPÚ_get_extra_dictÚ_get_resource_tagsrº  r  )	r£   rY   r¦  rC  Únetsr  Ú	extra_mapÚnetr  s	            r   Úex_list_networksz%CloudStackNodeDriver.ex_list_networksb  sÿ   € ð ˆàÐØ '¤
ˆD�Ñà× Ò ¨ÀÈUÐ ÑSÔSˆØ�wŠw�y "Ñ%Ô%ˆàˆÝ1°)Ô<ˆ	Øð 	ð 	ˆCØ×(Ò(¨¨iÑ8Ô8ˆEà˜ˆ}ˆ}Ø $× 7Ò 7¸¸F¼Ñ DÔ D��f‘à�OŠOÝ!Ø˜Ô&Ø˜”KØÐ+Ô,Ø˜”IØ˜”MØØðñ ô ñ
ô 
ð 
ð 
ð ˆr¤   c                 ó  — |                       dd¬¦  «        }|                     dg ¦  «        }g }|D ]N}|                     t          |d         |d         |d         |d         |d	         |d
         | ¦  «        ¦  «         ŒO|S )zu
        List the available network offerings

        :rtype ``list`` of :class:`CloudStackNetworkOffering`
        ÚlistNetworkOfferingsr­  r  Únetworkofferingr“   r  ÚguestiptyperÐ   rQ   Úforvpc)r·  r¸  rº  r  )r£   rC  Ú	netoffersÚnetworkofferingsÚnetoffers        r   Úex_list_network_offeringsz.CloudStackNodeDriver.ex_list_network_offeringsŠ  s«   € ð × Ò Ð)?ÈÐ ÑNÔNˆØ—G’GÐ-¨rÑ2Ô2ˆ	àÐà!ð 	ð 	ˆHØ×#Ò#Ý)Ø˜VÔ$Ø˜]Ô+Ø˜]Ô+Ø˜T”NØÐ0Ô1Ø˜XÔ&Øñô ñ
ô 
ð 
ð 
ð  Ðr¤   c
           	      óB  — t           d         }
|||j        |j        dœ}|�||d<   |�||d<   |�||d<   |�||d<   |	�|	|d<   	 |                      d	|d
¬¦  «        }|d         }|                      ||
¦  «        }t	          |||j        |d         |j        | |¬¦  «        }|S )a  

        Creates a Network, only available in advanced zones.

        :param  display_text: the display text of the network
        :type   display_text: ``str``

        :param  name: the name of the network
        :type   name: ``str``

        :param  network_offering: NetworkOffering object
        :type   network_offering: :class:'CloudStackNetworkOffering`

        :param location: Zone object
        :type  location: :class:`NodeLocation`

        :param  gateway: Optional, the Gateway of this network
        :type   gateway: ``str``

        :param  netmask: Optional, the netmask of this network
        :type   netmask: ``str``

        :param  network_domain: Optional, the DNS domain of the network
        :type   network_domain: ``str``

        :param  vpc_id: Optional, the VPC id the network belongs to
        :type   vpc_id: ``str``

        :param  project_id: Optional, the project id the networks belongs to
        :type   project_id: ``str``

        :rtype: :class:`CloudStackNetwork`

        r–   )r  r“   r  rE   Nr=   r>   r8   r?   r@   ÚcreateNetworkr­  r®  rÐ   r  )rU  rÐ   r·  rV  r  )r£   r!  r“   Únetwork_offeringr¼  r=   r>   r7   rA   rB   rY  r¦  r  r  r–   s                  r   Úex_create_networkz&CloudStackNodeDriver.ex_create_network¤  s÷   € õ^ 2°)Ô<ˆ	ð (ØØ!1Ô!4Ø”kð	
ð 
ˆð ÐØ%ˆD�‰OàÐØ%ˆD�‰OàÐ%Ø$2ˆD�Ñ!àÐØ"ˆD�‰MàÐ!Ø *ˆD�Ñð	+ð ×#Ò#¨OÀDÐQVÐ#ÑWÔWˆà˜	Ô"ˆØ×$Ò$ V¨YÑ7Ô7ˆå#ØØØÔØ�4ŒLØŒKØØð
ñ 
ô 
ˆð ˆr¤   c                 óJ   — |j         |dœ}|                      d|d¬¦  «         dS )a  

        Deletes a Network, only available in advanced zones.

        :param  network: The network
        :type   network: :class: 'CloudStackNetwork'

        :param  force: Force deletion of the network?
        :type   force: ``bool``

        :rtype: ``bool``

        )rÐ   ÚforcedÚdeleteNetworkr­  r®  Tr:  )r£   r–   Úforcer¦  s       r   Úex_delete_networkz&CloudStackNodeDriver.ex_delete_network  s3   € ð ”j¨EÐ2Ð2ˆà×Ò O¸DÈÐÑOÔOÐOØˆtr¤   c           	      óÜ   — |                       dd¬¦  «        }|                     dg ¦  «        }g }|D ]9}|                     t          |d         |d         |d         | ¦  «        ¦  «         Œ:|S )zm
        List the available vpc offerings

        :rtype ``list`` of :class:`CloudStackVPCOffering`
        ÚlistVPCOfferingsr­  r  Úvpcofferingr“   r  rÐ   )r·  r¸  rº  r8  )r£   rC  Ú	vpcoffersÚvpcofferingsÚvpcoffers        r   Úex_list_vpc_offeringsz*CloudStackNodeDriver.ex_list_vpc_offerings  s�   € ð × Ò Ð);ÀEÐ ÑJÔJˆØ—G’G˜M¨2Ñ.Ô.ˆ	àˆà!ð 	ð 	ˆHØ×ÒÝ%Ø˜VÔ$ h¨}Ô&=¸xÈ¼~Ètñô ñô ð ð ð Ðr¤   c                 ó$  — i }|�
|j         |d<   |                      d|d¬¦  «        }|                     dg ¦  «        }g }|D ]N}|                     t	          |d         |d         |d	         |d
         | |d         |d         ¦  «        ¦  «         ŒO|S )zâ
        List the available VPCs

        :keyword    project: Optional project under which VPCs are present.
        :type       project: :class:`.CloudStackProject`

        :rtype ``list`` of :class:`CloudStackVPC`
        Nr@   ÚlistVPCsr­  r®  r™   r“   rd   rÐ   r5  rE   r  )rÐ   r·  r¸  rº  r3  )r£   rY   r¦  rC  Úvpcsr  r™   s          r   rB  z!CloudStackNodeDriver.ex_list_vpcs-  sº   € ð ˆàÐØ '¤
ˆD�Ñà× Ò ¨¸DÈÐ ÑOÔOˆØ�wŠw�u˜bÑ!Ô!ˆàˆØð 	ð 	ˆCØ�OŠOÝØ˜”KØ˜Ô(Ø˜”IØ˜”KØØ˜”MØ˜Ô&ñô ñ
ô 
ð 
ð 
ð ˆr¤   c                 ó  — i }|�||d<   |                       d|d¬¦  «        }|                     dg ¦  «        }g }|D ]G}|                     t          |d         |d         |d	         |d
         |d         | ¦  «        ¦  «         ŒH|S )zT
        List routers

        :rtype ``list`` of :class:`CloudStackRouter`
        Nr?   ÚlistRoutersr­  r®  ÚrouterrÐ   r“   r/   Úpublicip)r·  r¸  rº  rh  )r£   rA   r¦  rC  ÚrtsÚroutersrz  s          r   Úex_list_routersz$CloudStackNodeDriver.ex_list_routersO  s¯   € ð ˆàÐØ"ˆD�‰Mà× Ò ¨¸tÈEÐ ÑRÔRˆØ�gŠg�h Ñ#Ô#ˆàˆØð 
	ð 
	ˆFØ�NŠNÝ Ø˜4”LØ˜6”NØ˜7”OØ˜:Ô&Ø˜7”OØñô ñ	ô 	ð 	ð 	ð ˆr¤   c           
      óè   — t           d         }||||j        |dœ}|�||d<   |                      d|d¬¦  «        }	|                      |	|¦  «        }
t	          ||j        |	d         || |||
¬	¦  «        }|S )
aõ  

        Creates a VPC, only available in advanced zones.

        :param  cidr: the cidr of the VPC. All VPC guest networks' cidrs
                should be within this CIDR

        :type   display_text: ``str``

        :param  display_text: the display text of the VPC
        :type   display_text: ``str``

        :param  name: the name of the VPC
        :type   name: ``str``

        :param  vpc_offering: the ID of the VPC offering
        :type   vpc_offering: :class:'CloudStackVPCOffering`

        :param  zone_id: the ID of the availability zone
        :type   zone_id: ``str``

        :param  network_domain: Optional, the DNS domain of the network
        :type   network_domain: ``str``

        :rtype: :class:`CloudStackVPC`

        r™   )r5  r  r“   rd   rE   Nr8   Ú	createVPCr­  r®  rÐ   r  )rU  rÐ   r·  rV  r3  )r£   r5  r!  r“   Úvpc_offeringrD   r7   rY  r¦  r  r  r™   s               r   Úex_create_vpcz"CloudStackNodeDriver.ex_create_vpcm  s§   € õ: 2°%Ô8ˆ	ð Ø'ØØ)œ_Øð
ð 
ˆð Ð%Ø$2ˆD�Ñ!à×#Ò#¨KÀÈUÐ#ÑSÔSˆà×$Ò$ V¨YÑ7Ô7ˆåØØŒOØ�4ŒLØØØØØð	
ñ 	
ô 	
ˆð ˆ
r¤   c                 óH   — d|j         i}|                      d|d¬¦  «         dS )z©

        Deletes a VPC, only available in advanced zones.

        :param  vpc: The VPC
        :type   vpc: :class: 'CloudStackVPC'

        :rtype: ``bool``

        rÐ   Ú	deleteVPCr­  r®  Tr:  )r£   r™   r¦  s      r   Úex_delete_vpcz"CloudStackNodeDriver.ex_delete_vpc¨  s/   € ð �c”fˆ~ˆà×Ò K¸ÀUÐÑKÔKÐKØˆtr¤   c           
      ój  — |                       dd¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]s}|                      ||¦  «        }d|v r|                      |d         ¦  «        |d<   |                     t          |d         |d         |d         | |¬	¦  «        ¦  «         Œt|S )
zd
        List the available projects

        :rtype ``list`` of :class:`CloudStackProject`
        ÚlistProjectsr­  r  rY   r}   rÐ   r“   r  ro  )r·  r¸  rU  rV  rW  rº  rm  )r£   rC  ÚprojsÚprojectsrY  Úprojr  s          r   Úex_list_projectsz%CloudStackNodeDriver.ex_list_projects¹  sÖ   € ð × Ò ¨ÀÐ ÑFÔFˆØ—’˜	 2Ñ&Ô&ˆàˆÝ1°)Ô<ˆ	Øð 	ð 	ˆDØ×(Ò(¨¨yÑ9Ô9ˆEà˜ˆ~ˆ~Ø $× 7Ò 7¸¸V¼Ñ EÔ E��f‘à�OŠOÝ!Ø˜D”zØ˜fœØ!% mÔ!4ØØðñ ô ñô ð ð ð ˆr¤   c                 óB  — |€>|                       ¦   «         D ]}|j        |k    s|j        r nŒt          d|z  ¦  «        ‚nD|                       ¦   «         D ]}|j        |k    r|j        s|j        } nŒt          d|z  ¦  «        ‚|€|                      ¦   «         d         }||j        |j        dœ}|j        r||d<   |                      d|d¬	¦  «        }|d
         }	|                      |	¦  «        }
t          |	d         |||
| t          |	d         ¬¦  «        ¬¦  «        S )zN
        Creates a data volume
        Defaults to the first location
        Nz$Disk offering with size=%s not foundz"Volume type with name=%s not foundr   )r“   ÚdiskOfferingIdÚzoneIdr  ÚcreateVolumer­  r®  r˜   rÐ   r“   ©r“   ©rÐ   r“   r  r/   r    r  )rR  r  r  r   r“   rÈ  rÐ   r   Ú_to_volume_stater   Údict)r£   r  r“   r¼  ÚsnapshotÚex_volume_typeÚdiskOfferingr°  ÚrequestResultÚvolumeResponser/   s              r   Úcreate_volumez"CloudStackNodeDriver.create_volume×  s…  € ð
 Ð!Ø $× ;Ò ;Ñ =Ô =ð Sð S�ØÔ$¨Ò,Ð,°Ô0IÐ,Ø�Eð -õ $Ð$JÈTÑ$QÑRÔRÐRð ð !%× ;Ò ;Ñ =Ô =ð [ð [�ØÔ$¨Ò6Ð6Ø'Ô4ð 1Ø+Ô0˜Ø�Eð 7õ
 $Ð$HÈ>Ñ$YÑZÔZÐZàÐØ×*Ò*Ñ,Ô,¨QÔ/ˆHð Ø*œoØ”kð
ð 
ˆð Ô$ð 	"Ø!ˆF�6‰Nà×+Ò+°NÈ6ÐZ_Ð+Ñ`Ô`ˆà& xÔ0ˆà×%Ò% nÑ5Ô5ˆåØ˜dÔ#ØØØØÝ˜N¨6Ô2Ð3Ñ3Ô3ð
ñ 
ô 
ð 	
r¤   c                 óD   — |                       dd|j        id¬¦  «         dS )ú"
        :rtype: ``bool``
        ÚdeleteVolumerÐ   r­  r®  T)r·  rÐ   ©r£   r˜   s     r   Údestroy_volumez#CloudStackNodeDriver.destroy_volume	  s,   € ð 	×Ò >¸4ÀÄÐ:KÐTYÐÑZÔZÐZØˆtr¤   c                 óP   — |                       d|j        |j        dœd¬¦  «         dS )z„
        @inherits: :class:`NodeDriver.attach_volume`
        :type node: :class:`CloudStackNode`

        :rtype: ``bool``
        ÚattachVolume)rÐ   ÚvirtualMachineIdr­  r®  Tr?  )r£   r—   r˜   Údevices       r   Úattach_volumez"CloudStackNodeDriver.attach_volume	  s=   € ð 	×ÒØ"Ø œ)¸¼ÐAÐAØð 	ñ 	
ô 	
ð 	
ð
 ˆtr¤   c                 óD   — |                       dd|j        id¬¦  «         dS )r›  ÚdetachVolumerÐ   r­  r®  Tr?  r�  s     r   Údetach_volumez"CloudStackNodeDriver.detach_volume	  s,   € ð 	×Ò N¸DÀ&Ä)Ð;LÐUZÐÑ[Ô[Ð[Øˆtr¤   c                 óÖ  — |r |                       dd|j        id¬¦  «        }n|                       dd¬¦  «        }g }t          d         }|                     dg ¦  «        D ]‰}|                      ||¦  «        }d|v r|                      |d         ¦  «        |d<   |                      |¦  «        }|                     t          |d         |d	         |d
         || |¬¦  «        ¦  «         ŒŠ|S )zÃ
        List all volumes

        :param node: Only return volumes for the provided node.
        :type node: :class:`CloudStackNode`

        :rtype: ``list`` of :class:`StorageVolume`
        ÚlistVolumesr]   r­  r®  r  r˜   r}   rÐ   r“   r  r‘  )	r·  rÐ   rU  r¸  rV  rW  r’  rº  r   )r£   r—   ÚvolumesÚlist_volumesrY  Úvolr  r/   s           r   rª  z!CloudStackNodeDriver.list_volumes#	  s   € ð ð 	NØ×(Ò(Ø%Ø*¨D¬GÐ4Øð )ñ ô ˆGˆGð ×(Ò(°ÀuÐ(ÑMÔMˆGàˆå1°(Ô;ˆ	Ø—;’;˜x¨Ñ,Ô,ð 	ð 	ˆCØ×(Ò(¨¨iÑ8Ô8ˆEà˜ˆ}ˆ}Ø $× 7Ò 7¸¸F¼Ñ DÔ D��f‘à×)Ò)¨#Ñ.Ô.ˆEà×ÒÝØ˜4”yØ˜VœØ˜VœØØØðñ ô ñ	ô 	ð 	ð 	ð Ðr¤   c                 óš  — d|i}|r
|j         |d<   |                      d|¬¦  «        }|st          d|z  ¦  «        ‚|d         d         }t          d         }|                      ||¦  «        }d|v r|                      |d         ¦  «        |d<   |                      |¦  «        }t          |d         |d	         ||d
         | |¬¦  «        }	|	S )av  
        Return a StorageVolume object based on its ID.

        :param  volume_id: The id of the volume
        :type   volume_id: ``str``

        :keyword    project: Limit volume returned to those configured under
                             the defined project.
        :type       project: :class:`.CloudStackProject`

        :rtype: :class:`CloudStackNode`
        rÐ   r@   r¨  ©r¯  r°  zVolume '%s' not foundr˜   r   r}   r“   r  )rÐ   r“   r/   r  r    r  )rÐ   r·  r£  rU  rV  rW  r’  r   )
r£   Ú	volume_idrY   r¦  r©  r«  rY  r  r/   r˜   s
             r   Úex_get_volumez"CloudStackNodeDriver.ex_get_volumeL	  sõ   € ð �iÐ ˆØð 	+Ø '¤
ˆD�ÑØ×$Ò$¨]À4Ð$ÑHÔHˆØð 	AÝÐ3°iÑ?Ñ@Ô@Ð@Ø�hÔ Ô"ˆå1°(Ô;ˆ	Ø×$Ò$ S¨)Ñ4Ô4ˆà�Sˆ=ˆ=Ø ×3Ò3°C¸´KÑ@Ô@ˆE�&‰Mà×%Ò% cÑ*Ô*ˆåØ�4ŒyØ�V”ØØ�V”ØØð
ñ 
ô 
ˆð ˆr¤   c                 ó¶   — |                      ¦   «         }|                      d|d¬¦  «        }|                     dg ¦  «        }|                      |¬¦  «        }|S )a  
        List registered key pairs.

        :param     projectid: list objects by project
        :type      projectid: ``str``

        :param     page: The page to list the keypairs from
        :type      page: ``int``

        :param     keyword: List by keyword
        :type      keyword: ``str``

        :param     listall: If set to false, list only resources
                            belonging to the command's caller;
                            if set to true - list resources that
                            the caller is authorized to see.
                            Default value is false

        :type      listall: ``bool``

        :param     pagesize: The number of results per page
        :type      pagesize: ``int``

        :param     account: List resources by account.
                            Must be used with the domainId parameter
        :type      account: ``str``

        :param     isrecursive: Defaults to false, but if true,
                                lists all resources from
                                the parent specified by the
                                domainId till leaves.
        :type      isrecursive: ``bool``

        :param     fingerprint: A public key fingerprint to look for
        :type      fingerprint: ``str``

        :param     name: A key pair name to look for
        :type      name: ``str``

        :param     domainid: List only resources belonging to
                                     the domain specified
        :type      domainid: ``str``

        :return:   A list of key par objects.
        :rtype:   ``list`` of :class:`libcloud.compute.base.KeyPair`
        ÚlistSSHKeyPairsr­  r®  Ú
sshkeypairr  )Úcopyr·  r¸  Ú_to_key_pairs)r£   r§  Ú
extra_argsrC  Ú	key_pairss        r   Úlist_key_pairsz#CloudStackNodeDriver.list_key_pairss	  s]   € ð^ —[’[‘]”]ˆ
Ø× Ò Ð):À:ÐV[Ð Ñ\Ô\ˆØ—G’G˜L¨"Ñ-Ô-ˆ	Ø×&Ò&¨IÐ&Ñ6Ô6ˆ	ØÐr¤   c                 óê   — d|i}|                       d|d¬¦  «        }|                     dg ¦  «        }t          |¦  «        dk    rt          || ¬¦  «        ‚|                      |d         ¬¦  «        }|S )	z¤
        Retrieve a single key pair.

        :param name: Name of the key pair to retrieve.
        :type name: ``str``

        :rtype: :class:`.KeyPair`
        r“   r±  r­  r®  r²  r   )r“   r    r  )r·  r¸  r¡  r   Ú_to_key_pair)r£   r“   r°  rC  r¶  Úkey_pairs         r   Úget_key_pairz!CloudStackNodeDriver.get_key_pair¨	  s   € ð ˜$�ˆØ× Ò Ð):À6ÐRWÐ ÑXÔXˆØ—G’G˜L¨"Ñ-Ô-ˆ	åˆy‰>Œ>˜QÒÐÝ*°¸TÐBÑBÔBÐBà×$Ò$¨)°A¬,Ð$Ñ7Ô7ˆØˆr¤   c                 óÈ   — |                      ¦   «         }d|i}|                     |¦  «         |                      d|d¬¦  «        }|                      |d         ¬¦  «        }|S )a  
        Create a new key pair object.

        :param name: Key pair name.
        :type name: ``str``

        :param     name: Name of the keypair (required)
        :type      name: ``str``

        :param     projectid: An optional project for the ssh key
        :type      projectid: ``str``

        :param     domainid: An optional domainId for the ssh key.
                             If the account parameter is used,
                             domainId must also be used.
        :type      domainid: ``str``

        :param     account: An optional account for the ssh key.
                            Must be used with domainId.
        :type      account: ``str``

        :return:   Created key pair object.
        :rtype:    :class:`libcloud.compute.base.KeyPair`
        r“   ÚcreateSSHKeyPairr­  r®  rF   r  )r³  r¹  r·  r¹  )r£   r“   r§  rµ  r°  rC  rº  s          r   Úcreate_key_pairz$CloudStackNodeDriver.create_key_pair»	  sg   € ð2 —[’[‘]”]ˆ
à˜$�ˆØ�Š�jÑ!Ô!Ð!à× Ò Ð);ÀFÐSXÐ ÑYÔYˆØ×$Ò$¨#¨i¬.Ð$Ñ9Ô9ˆØˆr¤   c                 ót   — |                       d||dœd¬¦  «        }|                      |d         ¬¦  «        }|S )a1  
        Import a new public key from string.

        :param name: Key pair name.
        :type name: ``str``

        :param key_material: Public key material.
        :type key_material: ``str``

        :return: Imported key pair object.
        :rtype: :class:`libcloud.compute.base.KeyPair`
        ÚregisterSSHKeyPair)r“   Ú	publickeyr­  r®  rF   r  )r·  r¹  )r£   r“   Úkey_materialrC  rº  s        r   Úimport_key_pair_from_stringz0CloudStackNodeDriver.import_key_pair_from_stringÝ	  sP   € ð × Ò Ø(Ø ¨|Ð<Ð<Øð !ñ 
ô 
ˆð
 ×$Ò$¨#¨i¬.Ð$Ñ9Ô9ˆØˆr¤   c                 ó®   — |                      ¦   «         }d|j        i}|                     |¦  «         |                      d|d¬¦  «        }|d         dk    S )a�  
        Delete an existing key pair.

        :param key_pair: Key pair object.
        :type key_pair: :class:`libcloud.compute.base.KeyPair`

        :param     projectid: The project associated with keypair
        :type      projectid: ``str``

        :param     domainid: The domain ID associated with the keypair
        :type      domainid: ``str``

        :param     account: The account associated with the keypair.
                            Must be used with the domainId parameter.
        :type      account: ``str``

        :return:   True of False based on success of Keypair deletion
        :rtype:    ``bool``
        r“   ÚdeleteSSHKeyPairr­  r®  ÚsuccessÚtrue)r³  r“   r¹  r·  )r£   rº  r§  rµ  r°  rC  s         r   Údelete_key_pairz$CloudStackNodeDriver.delete_key_pairò	  sZ   € ð* —[’[‘]”]ˆ
Ø˜(œ-Ð(ˆØ�Š�jÑ!Ô!Ð!à× Ò Ð);ÀFÐSXÐ ÑYÔYˆØ�9Œ~ Ò'Ð'r¤   c                 ó0  — g }|                       dd¬¦  «        }|s|S |d         D ]o}|                     t          |d         |d         | |                     dg ¦  «        |                     d¦  «        |                     d	¦  «        ¦  «        ¦  «         Œp|S )
zh
        Lists all Public IP Addresses.

        :rtype: ``list`` of :class:`CloudStackAddress`
        rÌ  r­  r  rÏ  rÐ   rÐ  Úassociatednetworkidr?   r]   )r·  rº  rÎ   r¸  )r£   ÚipsrC  Úips       r   rþ  z'CloudStackNodeDriver.ex_list_public_ips
  sµ   € ð ˆà× Ò Ð)@ÈÐ ÑOÔOˆð ð 	ØˆJàÐ'Ô(ð 
	ð 
	ˆBØ�JŠJÝ!Ø�t”HØ�{”OØØ—F’FÐ0°"Ñ5Ô5Ø—F’F˜7‘O”OØ—F’FÐ-Ñ.Ô.ñô ñ	ô 	ð 	ð 	ð ˆ
r¤   c                 óþ   — i }|�|j         |d<   n"|                      ¦   «         d         j         |d<   |�||d<   |�||d<   |                      d|d¬¦  «        }|d	         }t          |d
         |d	         | ¦  «        }|S )aR  
        Allocate a public IP.

        :param vpc_id: VPC the ip belongs to
        :type vpc_id: ``str``

        :param network_id: Network where this IP is connected to.
        :type network_id: ''str''

        :param location: Zone
        :type  location: :class:`NodeLocation`

        :rtype: :class:`CloudStackAddress`
        NrE   r   r?   Ú	networkidÚassociateIpAddressr­  r®  rÐ  rÐ   )rÐ   rÈ  r   rÎ   )r£   rA   rí   r¼  r¦  ró  s         r   r¡   z*CloudStackNodeDriver.ex_allocate_public_ip*
  s�   € ð  ˆàÐØ%œ[ˆD�‰NˆNà!×0Ò0Ñ2Ô2°1Ô5Ô8ˆD�‰NàÐØ"ˆD�‰MàÐ!Ø *ˆD�Ñà×"Ò"Ð+?ÈÐUZÐ"Ñ[Ô[ˆØ�KÔ ˆÝ   d¤¨T°+Ô->ÀÑEÔEˆØˆr¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )z³
        Release a public IP.

        :param address: CloudStackAddress which should be used
        :type  address: :class:`CloudStackAddress`

        :rtype: ``bool``
        ÚdisassociateIpAddressrÐ   r­  r®  rÆ  r?  )r£   r¨   rC  s      r   r§   z)CloudStackNodeDriver.ex_release_public_ipL
  s8   € ð ×!Ò!Ø+°T¸7¼:Ð4FÈuð "ñ 
ô 
ˆð �9Œ~Ðr¤   c                 óº  ‡— g }|                       dd¬¦  «        }|i k    rº|                      ¦   «         }|d         D ]�Šˆfd„|D ¦   «         }|                     t          ‰d         |d         ‰d         ‰d	         ‰                     d
¦  «        ‰                     d¦  «        ‰                     d¦  «        ‰                     d¦  «        ¦  «        ¦  «         Œž|S )zg
        Lists all Firewall Rules

        :rtype: ``list`` of :class:`CloudStackFirewallRule`
        ÚlistFirewallRulesr­  r  Úfirewallrulec                 ó6   •— g | ]}|j         ‰d          k    ¯|‘ŒS rý  rÕ   ©rÚ  rä  r·   s     €r   rÜ  z?CloudStackNodeDriver.ex_list_firewall_rules.<locals>.<listcomp>e
  ó*   ø€ ÐPÐPÐP˜a°´¸dÀ;Ô>OÒ1OÐ1O˜Ð1OÐ1OÐ1Or¤   rÐ   r   Úcidrlistrª   ÚicmpcodeÚicmptyperß  rà  )r·  rþ  rº  râ   r¸  )r£   rø  r  rÔ  ró  r·   s        @r   Úex_list_firewall_rulesz+CloudStackNodeDriver.ex_list_firewall_rulesZ
  só   ø€ ð ˆØ×#Ò#Ð,?ÈÐ#ÑNÔNˆØ�RŠ<ˆ<Ø×0Ò0Ñ2Ô2ˆJØ˜~Ô.ð ð �ØPÐPÐPÐP :ÐPÑPÔP�à—’Ý*Ø˜Tœ
Ø˜QœØ˜ZÔ(Ø˜ZÔ(ØŸš Ñ,Ô,ØŸš Ñ,Ô,ØŸš Ñ-Ô-ØŸš Ñ+Ô+ñ	ô 	ñô ð ð ð ˆr¤   c           
      ó0  — |j         ||dœ}|�t          |¦  «        |d<   |�t          |¦  «        |d<   |�t          |¦  «        |d<   |�t          |¦  «        |d<   |                      d|d¬	¦  «        }	t          |	d
         d         |||||||¦  «        }
|
S )aü  
        Creates a Firewall Rule

        :param      address: External IP address
        :type       address: :class:`CloudStackAddress`

        :param      cidr_list: cidr list
        :type       cidr_list: ``str``

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      icmp_code: Error code for this icmp message
        :type       icmp_code: ``int``

        :param      icmp_type: Type of the icmp message being sent
        :type       icmp_type: ``int``

        :param      start_port: start of port range
        :type       start_port: ``int``

        :param      end_port: end of port range
        :type       end_port: ``int``

        :rtype: :class:`CloudStackFirewallRule`
        )ÚipaddressidrØ  rª   NrÙ  rÚ  rß  rà  ÚcreateFirewallRuler­  r®  rÔ  rÐ   )rÐ   r   r   râ   )r£   r¨   rä   rª   rå   ræ   r«   r¬   r¦  r  r·   s              r   Úex_create_firewall_rulez,CloudStackNodeDriver.ex_create_firewall_rulev
  sÁ   € ðH  'œz°yÈhÐWÐWˆØÐ Ý" 9™~œ~ˆD�ÑØÐ Ý" 9™~œ~ˆD�ÑØÐ!Ý # J¡¤ˆD�ÑØÐÝ! (™mœmˆD�‰OØ×$Ò$Ð-AÈ$ÐW\Ð$Ñ]Ô]ˆÝ%Ø�>Ô" 4Ô(ØØØØØØØñ	
ô 	
ˆð ˆr¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )zÃ
        Remove a Firewall Rule.

        :param firewall_rule: Firewall rule which should be used
        :type  firewall_rule: :class:`CloudStackFirewallRule`

        :rtype: ``bool``
        ÚdeleteFirewallRulerÐ   r­  r®  rÆ  r?  ©r£   Úfirewall_rulerC  s      r   Úex_delete_firewall_rulez,CloudStackNodeDriver.ex_delete_firewall_rule°
  s:   € ð ×!Ò!Ø(°$¸Ô8HÐ1IÐRWð "ñ 
ô 
ˆð �9Œ~Ðr¤   c                 óh  — g }|                       dd¬¦  «        }|d         D ]�}|                     t          |d         |d         |d         |d         |                     d	¦  «        |                     d
¦  «        |                     d¦  «        |                     d¦  «        ¦  «        ¦  «         Œ�|S )zt
        Lists all egress Firewall Rules

        :rtype: ``list`` of :class:`CloudStackEgressFirewallRule`
        ÚlistEgressFirewallRulesr­  r  rÔ  rÐ   rÎ  rØ  rª   rÙ  rÚ  rß  rà  )r·  rº  rë   r¸  )r£   rø  r  r·   s       r   Úex_list_egress_firewall_rulesz2CloudStackNodeDriver.ex_list_egress_firewall_rules¾
  sÀ   € ð ˆØ×#Ò#Ð,EÈeÐ#ÑTÔTˆØ˜>Ô*ð 	ð 	ˆDØ�LŠLÝ,Ø˜”JØ˜Ô%Ø˜Ô$Ø˜Ô$Ø—H’H˜ZÑ(Ô(Ø—H’H˜ZÑ(Ô(Ø—H’H˜[Ñ)Ô)Ø—H’H˜YÑ'Ô'ñ	ô 	ñô ð ð ð ˆr¤   c           
      ó&  — |||dœ}|�t          |¦  «        |d<   |�t          |¦  «        |d<   |�t          |¦  «        |d<   |�t          |¦  «        |d<   |                      d|d¬	¦  «        }	t          |	d
         d         |||||||¦  «        }
|
S )a-  
        Creates a Firewall Rule

        :param      network_id: the id network network for the egress firewall
                    services
        :type       network_id: ``str``

        :param      cidr_list: cidr list
        :type       cidr_list: ``str``

        :param      protocol: TCP/IP Protocol (TCP, UDP)
        :type       protocol: ``str``

        :param      icmp_code: Error code for this icmp message
        :type       icmp_code: ``int``

        :param      icmp_type: Type of the icmp message being sent
        :type       icmp_type: ``int``

        :param      start_port: start of port range
        :type       start_port: ``int``

        :param      end_port: end of port range
        :type       end_port: ``int``

        :rtype: :class:`CloudStackEgressFirewallRule`
        )rÎ  rØ  rª   NrÙ  rÚ  rß  rà  ÚcreateEgressFirewallRuler­  r®  rÔ  rÐ   )r   r   rë   )r£   rí   rä   rª   rå   ræ   r«   r¬   r¦  r  r·   s              r   Úex_create_egress_firewall_rulez3CloudStackNodeDriver.ex_create_egress_firewall_ruleÖ
  sÀ   € ðJ (°YÈHÐUÐUˆØÐ Ý" 9™~œ~ˆD�ÑØÐ Ý" 9™~œ~ˆD�ÑØÐ!Ý # J¡¤ˆD�ÑØÐÝ! (™mœmˆD�‰Oà×$Ò$Ð-GÐPTÐ]bÐ$ÑcÔcˆå+Ø�>Ô" 4Ô(ØØØØØØØñ	
ô 	
ˆð ˆr¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )z×
        Remove a Firewall rule.

        :param egress_firewall_rule: Firewall rule which should be used
        :type  egress_firewall_rule: :class:`CloudStackEgressFirewallRule`

        :rtype: ``bool``
        ÚdeleteEgressFirewallRulerÐ   r­  r®  rÆ  r?  râ  s      r   Úex_delete_egress_firewall_rulez3CloudStackNodeDriver.ex_delete_egress_firewall_rule  s;   € ð ×!Ò!Ø.Ø˜-Ô*Ð+Øð "ñ 
ô 
ˆð
 �9Œ~Ðr¤   c                 ó6  ‡— i }|�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d	<   |	�|	|d
<   |
�|
|d<   |�||d<   g }|                       d|d¬¦  «        }|i k    r¨|                      ¦   «         }|                      ¦   «         }|d         D ]wŠˆfd„|D ¦   «         }ˆfd„|D ¦   «         }|                     t	          |d         ‰d         |d         ‰d         ‰d         ‰d         ‰d         ‰d         ¦  «        ¦  «         Œx|S )aÄ  
        Lists all Port Forwarding Rules

        :param     account: List resources by account.
                            Must be used with the domainId parameter
        :type      account: ``str``

        :param     domain_id: List only resources belonging to
                                     the domain specified
        :type      domain_id: ``str``

        :param     for_display: List resources by display flag (only root
                                admin is eligible to pass this parameter).
        :type      for_display: ``bool``

        :param     id: Lists rule with the specified ID
        :type      id: ``str``

        :param     ipaddress_id: list the rule belonging to
                                this public ip address
        :type      ipaddress_id: ``str``

        :param     is_recursive: Defaults to false, but if true,
                                lists all resources from
                                the parent specified by the
                                domainId till leaves.
        :type      is_recursive: ``bool``

        :param     keyword: List by keyword
        :type      keyword: ``str``

        :param     list_all: If set to false, list only resources
                            belonging to the command's caller;
                            if set to true - list resources that
                            the caller is authorized to see.
                            Default value is false
        :type      list_all: ``bool``

        :param     network_id: list port forwarding rules for certain network
        :type      network_id: ``string``

        :param     page: The page to list the keypairs from
        :type      page: ``int``

        :param     page_size: The number of results per page
        :type      page_size: ``int``

        :param     project_id: list objects by project
        :type      project_id: ``str``

        :rtype: ``list`` of :class:`CloudStackPortForwardingRule`
        Nrg   rc   rÐ   rÝ  ÚisrecursiveÚkeywordÚlistallrÎ  ÚpageÚpagesizer@   rÍ  r­  r®  râ  c                 óP   •— g | ]"}|j         t          ‰d          ¦  «        k    ¯ |‘Œ#S ©r]   ©rÐ   r   ©rÚ  Únr·   s     €r   rÜ  zFCloudStackNodeDriver.ex_list_port_forwarding_rules.<locals>.<listcomp>�  ó3   ø€ ÐRÐRÐR˜a¨A¬DµC¸Ð=OÔ8PÑ4QÔ4QÒ,QÐ,Q˜Ð,QÐ,QÐ,Qr¤   c                 ó6   •— g | ]}|j         ‰d          k    ¯|‘ŒS rý  rÕ   rÖ  s     €r   rÜ  zFCloudStackNodeDriver.ex_list_port_forwarding_rules.<locals>.<listcomp>�  r×  r¤   r   rª   ræ  rç  rè  ré  )r·  rþ  rù  rº  rø   )r£   rg   re   rÐ   Úipaddress_idÚis_recursiverð  Úlist_allrí   rò  Ú	page_sizerB   r¦  rø  r  rÔ  rõ  r—   ró  r·   s                      @r   Úex_list_port_forwarding_rulesz2CloudStackNodeDriver.ex_list_port_forwarding_rules#  s³  ø€ ðF ˆàÐØ%ˆD�‰OàÐ Ø(ˆD�Ñàˆ>ØˆD�‰JàÐ#Ø".ˆD�ÑàÐ#Ø".ˆD�ÑàÐØ%ˆD�‰OàÐØ&ˆD�‰OàÐ!Ø *ˆD�ÑàÐØˆD�‰LàÐ Ø(ˆD�ÑàÐ!Ø *ˆD�ÑàˆØ×#Ò#Ð,EÈdÐ[`Ð#ÑaÔaˆØ�RŠ<ˆ<Ø×0Ò0Ñ2Ô2ˆJØ—O’OÑ%Ô%ˆEØÐ3Ô4ð ð �ØRÐRÐRÐR 5ÐRÑRÔR�ØPÐPÐPÐP :ÐPÑPÔP�Ø—’Ý0Ø˜QœØ˜Tœ
Ø˜QœØ˜ZÔ(Ø˜\Ô*Ø˜]Ô+Ø˜_Ô-ØÐ-Ô.ñ	ô 	ñô ð ð ð ˆr¤   c
                 ó²  — |j         |t          |¦  «        t          |¦  «        |j         |dœ}
|rt          |¦  «        |
d<   |rt          |¦  «        |
d<   |	r|	|
d<   |                      d|
d¬¦  «        }t          ||d         d	         |||||||	¦	  «	        }|j        d
                              |¦  «         |j                             |j        ¦  «         |S )a�  
        Creates a Port Forwarding Rule, used for Source NAT

        :param  address: IP address of the Source NAT
        :type   address: :class:`CloudStackAddress`

        :param  private_port: Port of the virtual machine
        :type   private_port: ``int``

        :param  protocol: Protocol of the rule
        :type   protocol: ``str``

        :param  public_port: Public port on the Source NAT address
        :type   public_port: ``int``

        :param  node: The virtual machine
        :type   node: :class:`CloudStackNode`

        :param  network_id: The network of the vm the Port Forwarding rule
                            will be created for. Required when public Ip
                            address is not associated with any Guest
                            network yet (VPC case)
        :type   network_id: ``string``

        :rtype: :class:`CloudStackPortForwardingRule`
        )rÝ  rª   rç  ræ  r]   r³   rè  ré  rÎ  ÚcreatePortForwardingRuler­  r®  râ  rÐ   rê  )rÐ   r   r   rø   r  rº  rÔ  r¨   )r£   r—   r¨   r¯   r°   rª   r±   r²   r³   rí   r¦  r  r·   s                r   r´   z3CloudStackNodeDriver.ex_create_port_forwarding_rule   s  € ðN #œ:Ø Ý˜|Ñ,Ô,Ý˜kÑ*Ô*Ø $¤Ø(ð
ð 
ˆð ð 	9Ý$'¨Ñ$8Ô$8ˆD�Ñ!Øð 	;Ý%(Ð)9Ñ%:Ô%:ˆDÐ!Ñ"Øð 	+Ø *ˆD�Ñà×$Ò$Ð-GÐPTÐ]bÐ$ÑcÔcˆÝ+ØØÐ'Ô(¨Ô.ØØØØØØØñ

ô 

ˆð 	Œ
Ð*Ô+×2Ò2°4Ñ8Ô8Ð8ØŒ×Ò˜wœÑ/Ô/Ð/Øˆr¤   c                 óØ   — |j         d                              |¦  «         |j                             |j        j        ¦  «         |                      dd|j        id¬¦  «        }|d         S )a  
        Remove a Port forwarding rule.

        :param node: Node used in the rule
        :type  node: :class:`CloudStackNode`

        :param rule: Forwarding rule which should be used
        :type  rule: :class:`CloudStackPortForwardingRule`

        :rtype: ``bool``
        rê  ÚdeletePortForwardingRulerÐ   r­  r®  rÆ  )r  ÚremoverÔ  r¨   r   rÐ   )r£   r—   r·   rC  s       r   r»   z3CloudStackNodeDriver.ex_delete_port_forwarding_ruleå  sn   € ð 	Œ
Ð*Ô+×2Ò2°4Ñ8Ô8Ð8ØŒ×Ò˜tœ|Ô3Ñ4Ô4Ð4Ø×!Ò!Ø.¸¸d¼g°Èuð "ñ 
ô 
ˆð �9Œ~Ðr¤   c                 ó  ‡— i }|�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d	<   |	�|	|d
<   |
�|
|d<   |�||d<   |                       d|d¬¦  «        }g }|i k    rš|                      ¦   «         }|                      ¦   «         }|d         D ]iŠˆfd„|D ¦   «         }ˆfd„|D ¦   «         }|                     t	          |d         ‰d         |d         ‰d         ‰d         ‰d         ¦  «        ¦  «         Œj|S )a8  
        Lists all NAT/firewall forwarding rules

        :param     account: List resources by account.
                            Must be used with the domainId parameter
        :type      account: ``str``

        :param     domain_id: List only resources belonging to
                                     the domain specified
        :type      domain_id: ``str``

        :param     id: Lists rule with the specified ID
        :type      id: ``str``

        :param     ipaddress_id: list the rule belonging to
                                this public ip address
        :type      ipaddress_id: ``str``

        :param     is_recursive: Defaults to false, but if true,
                                lists all resources from
                                the parent specified by the
                                domainId till leaves.
        :type      is_recursive: ``bool``

        :param     keyword: List by keyword
        :type      keyword: ``str``

        :param     list_all: If set to false, list only resources
                            belonging to the command's caller;
                            if set to true - list resources that
                            the caller is authorized to see.
                            Default value is false
        :type      list_all: ``bool``

        :param     page: The page to list the keypairs from
        :type      page: ``int``

        :param     page_size: The number of results per page
        :type      page_size: ``int``

        :param     project_id: list objects by project
        :type      project_id: ``str``

        :param     virtualmachine_id: Lists all rules applied to
                                     the specified Vm
        :type      virtualmachine_id: ``str``

        :rtype: ``list`` of :class:`CloudStackIPForwardingRule`
        Nrg   rc   rÐ   rÝ  rï  rð  rñ  rò  ró  r@   r]   rÎ  r­  r®  rÞ  c                 óP   •— g | ]"}|j         t          ‰d          ¦  «        k    ¯ |‘Œ#S rõ  rö  r÷  s     €r   rÜ  zDCloudStackNodeDriver.ex_list_ip_forwarding_rules.<locals>.<listcomp>c  rù  r¤   c                 ó6   •— g | ]}|j         ‰d          k    ¯|‘ŒS rý  rÕ   rÖ  s     €r   rÜ  zDCloudStackNodeDriver.ex_list_ip_forwarding_rules.<locals>.<listcomp>d  r×  r¤   r   rª   rß  rà  )r·  rþ  rù  rº  rð   )r£   rg   re   rÐ   rû  rü  rð  rý  rò  rþ  rB   rÒ   r¦  r  rø  rÔ  rõ  r—   ró  r·   s                      @r   Úex_list_ip_forwarding_rulesz0CloudStackNodeDriver.ex_list_ip_forwarding_rulesù  s¢  ø€ ð@ ˆàÐØ%ˆD�‰OàÐ Ø(ˆD�Ñàˆ>ØˆD�‰JàÐ#Ø".ˆD�ÑàÐ#Ø".ˆD�ÑàÐØ%ˆD�‰OàÐØ&ˆD�‰OàÐØˆD�‰LàÐ Ø(ˆD�ÑàÐ!Ø *ˆD�ÑàÐ(Ø'8ˆDÐ#Ñ$à×#Ò#Ð,CÈDÐY^Ð#Ñ_Ô_ˆàˆØ�RŠ<ˆ<Ø×0Ò0Ñ2Ô2ˆJØ—O’OÑ%Ô%ˆEØÐ1Ô2ð ð �ØRÐRÐRÐR 5ÐRÑRÔR�ØPÐPÐPÐP :ÐPÑPÔP�Ø—’Ý.Ø˜QœØ˜Tœ
Ø˜QœØ˜ZÔ(Ø˜[Ô)Ø˜Yœñô ñ	ô 	ð 	ð 	ð ˆr¤   c                 óF  — |                      ¦   «         }|dvrdS |j        |t          |¦  «        dœ}|�t          |¦  «        |d<   |                      d|d¬¦  «        }|d         }t	          ||d	         ||||¦  «        }|j        d
                              |¦  «         |S )a�  
        "Add a NAT/firewall forwarding rule.

        :param      node: Node which should be used
        :type       node: :class:`CloudStackNode`

        :param      address: CloudStackAddress which should be used
        :type       address: :class:`CloudStackAddress`

        :param      protocol: Protocol which should be used (TCP or UDP)
        :type       protocol: ``str``

        :param      start_port: Start port which should be used
        :type       start_port: ``int``

        :param      end_port: End port which should be used
        :type       end_port: ``int``

        :rtype:     :class:`CloudStackForwardingRule`
        ©ÚTCPÚUDPN)rÝ  rª   rß  rà  ÚcreateIpForwardingRuler­  r®  rÞ  rÐ   rá  )rï  rÐ   r   r   rð   r  rº  )	r£   r—   r¨   rª   r«   r¬   r¦  r  r·   s	            r   r­   z1CloudStackNodeDriver.ex_create_ip_forwarding_ruleq  sÃ   € ð, —>’>Ñ#Ô#ˆØ˜>Ð)Ð)Ø�4ð #œ:Ø Ý˜Z™œð
ð 
ˆð
 ÐÝ! (™mœmˆD�‰Oà×$Ò$Ð-EÈdÐ[`Ð$ÑaÔaˆØÐ*Ô+ˆÝ)Ø�&˜”, ¨°:¸xñ
ô 
ˆð 	Œ
Ð(Ô)×0Ò0°Ñ6Ô6Ð6Øˆr¤   c                 ó„   — |j         d                              |¦  «         |                      dd|j        id¬¦  «         dS )a!  
        Remove a NAT/firewall forwarding rule.

        :param node: Node which should be used
        :type  node: :class:`CloudStackNode`

        :param rule: Forwarding rule which should be used
        :type  rule: :class:`CloudStackForwardingRule`

        :rtype: ``bool``
        rá  ÚdeleteIpForwardingRulerÐ   r­  r®  T)r  r  r   rÐ   )r£   r—   r·   s      r   r¸   z1CloudStackNodeDriver.ex_delete_ip_forwarding_rule›  sH   € ð 	Œ
Ð(Ô)×0Ò0°Ñ6Ô6Ð6Ø×ÒÐ$<ÀdÈDÌGÀ_Ð]bÐÑcÔcÐcØˆtr¤   c                 ó€   — ||dœ}|r||d<   |                       d|d¬¦  «        }t          |d         ||| |¦  «        }|S )aœ  
        Create an ACL List for a network within a VPC.

        :param name: Name of the network ACL List
        :type  name: ``string``

        :param vpc_id: Id of the VPC associated with this network ACL List
        :type  vpc_id: ``string``

        :param description: Description of the network ACL List
        :type  description: ``string``

        :rtype: :class:`CloudStackNetworkACLList`
        )r“   r?   r  ÚcreateNetworkACLListr­  r®  rÐ   )r·  rþ   )r£   r“   rA   r  r¦  r  Úacl_lists          r   Úex_create_network_acllistz.CloudStackNodeDriver.ex_create_network_acllist¬  s]   € ð   vÐ.Ð.ˆØð 	.Ø"-ˆD�Ñà×#Ò#Ð,BÈ4ÐX]Ð#Ñ^Ô^ˆå+¨F°4¬L¸$ÀÈÈkÑZÔZˆØˆr¤   c           
      ó¬   — |||||dœ}|r||d<   nd}|r||d<   |                       d|d¬¦  «        }	t          |	d         d	         |||||||¦  «        }
|
S )
aó  
        Creates an ACL rule in the given network (the network has to belong to
        VPC)

        :param      protocol: the protocol for the ACL rule. Valid values are
                    TCP/UDP/ICMP/ALL or valid protocol number
        :type       protocol: ``string``

        :param      acl_id: Name of the network ACL List
        :type       acl_id: ``str``

        :param      cidr_list: the cidr list to allow traffic from/to
        :type       cidr_list: ``str``

        :param      start_port: the starting port of ACL
        :type       start_port: ``str``

        :param      end_port: the ending port of ACL
        :type       end_port: ``str``

        :param      action: scl entry action, allow or deny
        :type       action: ``str``

        :param      traffic_type: the traffic type for the ACL,can be Ingress
                    or Egress, defaulted to Ingress if not specified
        :type       traffic_type: ``str``

        :rtype: :class:`CloudStackNetworkACL`
        )rª   ÚaclidrØ  rß  rà  r  Úallowr$   ÚcreateNetworkACLr­  r®  Ú
networkaclrÐ   )r   r  )r£   rª   r  rä   r«   r¬   r  r#   r¦  r  Úacls              r   Úex_create_network_aclz*CloudStackNodeDriver.ex_create_network_aclÅ  s    € ðR !ØØ!Ø#Øð
ð 
ˆð ð 	Ø#ˆD�‰NˆNàˆFàð 	/Ø".ˆD�Ñà×$Ò$Ð-?ÈÐUZÐ$Ñ[Ô[ˆå"Ø�<Ô  Ô&ØØØØØØØñ	
ô 	
ˆð ˆ
r¤   c                 óî   — g }|                       dd¬¦  «        }|s|S |d         D ]N}|                     t          |d         |d         |                     dg ¦  «        | |d         ¦  «        ¦  «         ŒO|S )	zg
        Lists all network ACLs

        :rtype: ``list`` of :class:`CloudStackNetworkACLList`
        ÚlistNetworkACLListsr­  r  ÚnetworkacllistrÐ   r“   r?   r  )r·  rº  rþ   r¸  )r£   Úacllistsr  Úacllists       r   Úex_list_network_acllistsz-CloudStackNodeDriver.ex_list_network_acllists  s�   € ð ˆà×#Ò#Ð,AÈ%Ð#ÑPÔPˆàð 	ØˆOàÐ.Ô/ð 		ð 		ˆGØ�OŠOÝ(Ø˜D”MØ˜F”OØ—K’K ¨Ñ,Ô,ØØ˜MÔ*ñô ñô ð ð ð ˆr¤   c                 ó@   — ||dœ}|                       d|d¬¦  «         dS )a`  
        Create an ACL List for a network within a VPC.Replaces ACL associated
        with a Network or private gateway

        :param acl_id: the ID of the network ACL
        :type  acl_id: ``string``

        :param network_id: the ID of the network
        :type  network_id: ``string``

        :rtype: :class:`CloudStackNetworkACLList`
        )r  rÎ  ÚreplaceNetworkACLListr­  r®  T©r   )r£   r  rí   r¦  s       r   Úex_replace_network_acllistz/CloudStackNodeDriver.ex_replace_network_acllist&  s3   € ð  ¨jÐ9Ð9ˆà×ÒÐ$;ÀDÐQVÐÑWÔWÐWàˆtr¤   c                 ó@  — g }|                       dd¬¦  «        }|s|S |d         D ]w}|                     t          |d         |d         |d         |d         |d	         |                     d
g ¦  «        |                     dg ¦  «        |d         ¦  «        ¦  «         Œx|S )zh
        Lists all network ACL items

        :rtype: ``list`` of :class:`CloudStackNetworkACL`
        ÚlistNetworkACLsr­  r  r  rÐ   rª   r  r  rØ  rß  rà  r$   )r·  rº  r  r¸  )r£   Úaclsr  r  s       r   Úex_list_network_aclz(CloudStackNodeDriver.ex_list_network_acl:  s¿   € ð ˆà×#Ò#Ð,=ÀeÐ#ÑLÔLˆàð 	ØˆKà˜,Ô'ð 	ð 	ˆCØ�KŠKÝ$Ø˜”IØ˜
”OØ˜”LØ˜”MØ˜
”OØ—G’G˜K¨Ñ,Ô,Ø—G’G˜I rÑ*Ô*Ø˜Ô&ñ	ô 	ñô ð ð ð ˆr¤   c                 óª   — t          j        d¦  «          | j        di |¤Ž}g }|D ],}|j        |j        |j        dœ}|                     |¦  «         Œ-|S )ah  
        List Registered SSH Key Pairs

        :param     projectid: list objects by project
        :type      projectid: ``str``

        :param     page: The page to list the keypairs from
        :type      page: ``int``

        :param     keyword: List by keyword
        :type      keyword: ``str``

        :param     listall: If set to false, list only resources
                            belonging to the command's caller;
                            if set to true - list resources that
                            the caller is authorized to see.
                            Default value is false

        :type      listall: ``bool``

        :param     pagesize: The number of results per page
        :type      pagesize: ``int``

        :param     account: List resources by account.
                            Must be used with the domainId parameter
        :type      account: ``str``

        :param     isrecursive: Defaults to false, but if true,
                                lists all resources from
                                the parent specified by the
                                domainId till leaves.
        :type      isrecursive: ``bool``

        :param     fingerprint: A public key fingerprint to look for
        :type      fingerprint: ``str``

        :param     name: A key pair name to look for
        :type      name: ``str``

        :param     domainid: List only resources belonging to
                                     the domain specified
        :type      domainid: ``str``

        :return:   A list of keypair dictionaries
        :rtype:   ``list`` of ``dict``
        zAThis method has been deprecated in favor of list_key_pairs method©r“   ÚfingerprintÚ
privateKeyrÌ   )ÚwarningsÚwarnr·  r“   r+  Úprivate_keyrº  )r£   r§  r¶  r  rº  Úitems         r   Úex_list_keypairsz%CloudStackNodeDriver.ex_list_keypairsW  s{   € õ^ 	ŒÐ\Ñ]Ô]Ð]à'�DÔ'Ð1Ð1¨&Ð1Ð1ˆ	àˆà!ð 	 ð 	 ˆHà œØ'Ô3Ø&Ô2ðð ˆDð
 �MŠM˜$ÑÔÐÐàˆr¤   c                 óv   — t          j        d¦  «          | j        dd|i|¤Ž}|j        |j        |j        dœ}|S )aÓ  
        Creates a SSH KeyPair, returns fingerprint and private key

        :param     name: Name of the keypair (required)
        :type      name: ``str``

        :param     projectid: An optional project for the ssh key
        :type      projectid: ``str``

        :param     domainid: An optional domainId for the ssh key.
                             If the account parameter is used,
                             domainId must also be used.
        :type      domainid: ``str``

        :param     account: An optional account for the ssh key.
                            Must be used with domainId.
        :type      account: ``str``

        :return:   A keypair dictionary
        :rtype:    ``dict``
        zBThis method has been deprecated in favor of create_key_pair methodr“   r*  rÌ   )r-  r.  r¾  r“   r+  r/  )r£   r“   r§  rº  r  s        r   Úex_create_keypairz&CloudStackNodeDriver.ex_create_keypair–  sX   € õ, 	ŒÐ]Ñ^Ô^Ð^à'�4Ô'Ð<Ð<¨TÐ<°VÐ<Ð<ˆð ”MØ#Ô/Ø"Ô.ð
ð 
ˆð ˆr¤   c                 óz   — t          j        d¦  «         |                      ||¬¦  «        }|j        |j        dœ}|S )aA  
        Imports a new public key where the public key is passed in as a string

        :param     name: The name of the public key to import.
        :type      name: ``str``

        :param     key_material: The contents of a public key file.
        :type      key_material: ``str``

        :rtype: ``dict``
        zNThis method has been deprecated in favor of import_key_pair_from_string method)r“   rÂ  ©ÚkeyNameÚkeyFingerprint)r-  r.  rÃ  r“   r+  )r£   r“   rÂ  rº  r  s        r   Úex_import_keypair_from_stringz2CloudStackNodeDriver.ex_import_keypair_from_string¸  sL   € õ 	ŒØ_ñ	
ô 	
ð 	
ð ×3Ò3¸ÈLÐ3ÑYÔYˆØ%œ]¸hÔ>RÐSÐSˆàˆr¤   c                 óz   — t          j        d¦  «         |                      ||¬¦  «        }|j        |j        dœ}|S )aH  
        Imports a new public key where the public key is passed via a filename

        :param     name: The name of the public key to import.
        :type      name: ``str``

        :param     keyfile: The filename with path of the public key to import.
        :type      keyfile: ``str``

        :rtype: ``dict``
        zLThis method has been deprecated in favor of import_key_pair_from_file method)r“   Úkey_file_pathr5  )r-  r.  Úimport_key_pair_from_filer“   r+  )r£   r“   Úkeyfilerº  r  s        r   Úex_import_keypairz&CloudStackNodeDriver.ex_import_keypairÍ  sL   € õ 	ŒØ]ñ	
ô 	
ð 	
ð ×1Ò1°tÈ7Ð1ÑSÔSˆØ%œ]¸hÔ>RÐSÐSˆàˆr¤   c                 ó|   — t          j        d¦  «         t          |dd| ¬¦  «        }|                      |¬¦  «        S )a{  
        Deletes an existing SSH KeyPair

        :param     keypair: Name of the keypair (required)
        :type      keypair: ``str``

        :param     projectid: The project associated with keypair
        :type      projectid: ``str``

        :param     domainid: The domain ID associated with the keypair
        :type      domainid: ``str``

        :param     account: The account associated with the keypair.
                             Must be used with the domainId parameter.
        :type      account: ``str``

        :return:   True of False based on success of Keypair deletion
        :rtype:    ``bool``
        zBThis method has been deprecated in favor of delete_key_pair methodN)r“   Ú
public_keyr+  r    )rº  )r-  r.  r   rÈ  )r£   rF   r§  rº  s       r   Úex_delete_keypairz&CloudStackNodeDriver.ex_delete_keypairâ  sC   € õ( 	ŒÐ]Ñ^Ô^Ð^å °DÀdÐSWÐXÑXÔXˆà×#Ò#¨XÐ#Ñ6Ô6Ð6r¤   c                 óŠ   — |                      ¦   «         }|                      d|d¬¦  «        }|                     dg ¦  «        }|S )a°  
        Lists Security Groups

        :param domainid: List only resources belonging to the domain specified
        :type  domainid: ``str``

        :param account: List resources by account. Must be used with
                                                   the domainId parameter.
        :type  account: ``str``

        :param listall: If set to false, list only resources belonging to
                                         the command's caller; if set to true
                                         list resources that the caller is
                                         authorized to see.
                                         Default value is false
        :type  listall: ``bool``

        :param pagesize: Number of entries per page
        :type  pagesize: ``int``

        :param keyword: List by keyword
        :type  keyword: ``str``

        :param tags: List resources by tags (key/value pairs)
        :type  tags: ``dict``

        :param id: list the security group by the id provided
        :type  id: ``str``

        :param securitygroupname: lists security groups by name
        :type  securitygroupname: ``str``

        :param virtualmachineid: lists security groups by virtual machine id
        :type  virtualmachineid: ``str``

        :param projectid: list objects by project
        :type  projectid: ``str``

        :param isrecursive: (boolean) defaults to false, but if true,
                                      lists all resources from the parent
                                      specified by the domainId till leaves.
        :type  isrecursive: ``bool``

        :param page: (integer)
        :type  page: ``int``

        :rtype ``list``
        ÚlistSecurityGroupsr­  r®  Úsecuritygroup)r³  r·  r¸  )r£   r§  rµ  rC  Úsecurity_groupss        r   Úex_list_security_groupsz,CloudStackNodeDriver.ex_list_security_groupsü  sG   € ðb —[’[‘]”]ˆ
Ø× Ò Ð)=ÀjÐY^Ð Ñ_Ô_ˆàŸ'š' /°2Ñ6Ô6ˆØÐr¤   c                 óø   — |                      ¦   «         }|                      ¦   «         D ]}||d         v rt          d¦  «        ‚Œd|i}|                     |¦  «         |                      d|d¬¦  «        d         S )aÐ  
        Creates a new Security Group

        :param name: name of the security group (required)
        :type  name: ``str``

        :param account: An optional account for the security group.
                        Must be used with domainId.
        :type  account: ``str``

        :param domainid: An optional domainId for the security group.
                         If the account parameter is used,
                         domainId must also be used.
        :type  domainid: ``str``

        :param description: The description of the security group
        :type  description: ``str``

        :param projectid: Deploy vm for the project
        :type  projectid: ``str``

        :rtype: ``dict``
        r“   z'This Security Group name already existsÚcreateSecurityGroupr­  r®  rC  )r³  rE  r   r¹  r·  )r£   r“   r§  rµ  Úsgr°  s         r   Úex_create_security_groupz-CloudStackNodeDriver.ex_create_security_group3  s•   € ð2 —[’[‘]”]ˆ
à×.Ò.Ñ0Ô0ð 	Oð 	OˆBØ�r˜&”zÐ!Ð!Ý#Ð$MÑNÔNÐNð "ð ˜$�ˆØ�Š�jÑ!Ô!Ð!à×!Ò!Ð*?ÈÐW\Ð!Ñ]Ô]Øô
ð 	
r¤   c                 óB   — |                       dd|id¬¦  «        d         S )aØ  
        Deletes a given Security Group

        :param domainid: The domain ID of account owning
                         the security group
        :type  domainid: ``str``

        :param id: The ID of the security group.
                   Mutually exclusive with name parameter
        :type  id: ``str``

        :param name: The ID of the security group.
                     Mutually exclusive with id parameter
        :type name: ``str``

        :param account: The account of the security group.
                        Must be specified with domain ID
        :type  account: ``str``

        :param projectid:  The project of the security group
        :type  projectid:  ``str``

        :rtype: ``bool``
        ÚdeleteSecurityGroupr“   r­  r®  rÆ  ©r·  )r£   r“   s     r   Úex_delete_security_groupz-CloudStackNodeDriver.ex_delete_security_groupY  s4   € ð4 ×!Ò!Ø)°6¸4°.Èð "ñ 
ô 
à
ôð 	r¤   c                 óÒ  — |                      ¦   «         }	|                     ¦   «         }|	                     |||dœ¦  «         |dvr|€|�t          d¦  «        ‚|dk    r|€|�t          d¦  «        ‚|dv r/|€t          d¦  «        ‚|�|€|}|	                     ||dœ¦  «         |dk    r |€d	}|€d	}|	                     ||d
œ¦  «         |                      d|	d¬¦  «        d         S )a	  
        Creates a new Security Group Ingress rule

        :param   securitygroupname: The name of the security group.
                                    Mutually exclusive with securitygroupid.
        :type    securitygroupname: ``str``

        :param   protocol: Can be TCP, UDP or ICMP.
                           Sometime other protocols can be used like AH, ESP
                           or GRE.
        :type    protocol: ``str``

        :param   cidrlist: Source address CIDR for which this rule applies.
        :type    cidrlist: ``str``

        :param   startport: Start port of the range for this ingress rule.
                            Applies to protocols TCP and UDP.
        :type    startport: ``int``

        :param   endport: End port of the range for this ingress rule.
                          It can be None to set only one port.
                          Applies to protocols TCP and UDP.
        :type    endport: ``int``

        :param   icmptype: Type of the ICMP packet (eg: 8 for Echo Request).
                           -1 or None means "all types".
                           Applies to protocol ICMP.
        :type    icmptype: ``int``

        :param   icmpcode: Code of the ICMP packet for the specified type.
                           If the specified type doesn't require a code set
                           this value to 0.
                           -1 or None means "all codes".
                           Applies to protocol ICMP.
        :type    icmpcode: ``int``

        :keyword   account: An optional account for the security group.
                            Must be used with domainId.
        :type      account: ``str``

        :keyword domainid: An optional domainId for the security group.
                           If the account parameter is used, domainId must also
                           be used.

        :keyword projectid: An optional project of the security group
        :type    projectid: ``str``

        :keyword securitygroupid: The ID of the security group.
                                  Mutually exclusive with securitygroupname
        :type    securitygroupid: ``str``

        :keyword usersecuritygrouplist: User to security group mapping
        :type    usersecuritygrouplist: ``dict``

        :rtype: ``dict``
        )Úsecuritygroupnamerª   rØ  r
  NzB"startport" and "endport" are only valid with protocol TCP or UDP.ÚICMPz<"icmptype" and "icmpcode" are only valid with protocol ICMP.z=Protocols TCP and UDP require at least "startport" to be set.)rß  rà  r   )rÚ  rÙ  ÚauthorizeSecurityGroupIngressr­  r®  rC  )r³  rï  r¹  r   r   )
r£   rO  rª   rØ  rß  rà  rÚ  rÙ  r§  r¦  s
             r   Ú#ex_authorize_security_group_ingressz8CloudStackNodeDriver.ex_authorize_security_group_ingressw  sT  € ðH �{Š{‰}Œ}ˆØ—>’>Ñ#Ô#ˆà�Šà%6Ø$Ø$ðð ñ	
ô 	
ð 	
ð ˜>Ð)Ð)¨yÐ/DÈÐH[ÝØWñô ð ð �vÒÐ 8Ð#7¸8Ð;OÝÐ aÑbÔbÐbà�~Ð%Ð%ØÐ Ý#ØVñô ð ð Ð$¨¨Ø#�à�KŠK i¸GÐDÐDÑEÔEÐEà�vÒÐØÐØ�ØÐØ�à�KŠK X¸8ÐDÐDÑEÔEÐEà×"Ò"Ø3¸DÈð #ñ 
ô 
à
ôð 	r¤   c                 ó:   — |                       dd|id¬¦  «         dS )z¥
        Revoke/delete an ingress security rule

        :param id: The ID of the ingress security rule
        :type  id: ``str``

        :rtype: ``bool``
        ÚrevokeSecurityGroupIngressrÐ   r­  r®  Tr#  )r£   rú   s     r   Ú ex_revoke_security_group_ingressz5CloudStackNodeDriver.ex_revoke_security_group_ingressä  s4   € ð 	×ÒØ0¸$À¸ÐQVð 	ñ 	
ô 	
ð 	
ð ˆtr¤   c                 óÞ   — |                       ¦   «         D ]}||j        k    rt          d¦  «        ‚Œ||j        dœ}|                      d|d¬¦  «        }|                      |d         ¦  «        S )aP  
        Creates a new Affinity Group

        :param name: Name of the affinity group
        :type  name: ``str``

        :param group_type: Type of the affinity group from the available
                           affinity/anti-affinity group types
        :type  group_type: :class:`CloudStackAffinityGroupType`

        :param description: Optional description of the affinity group
        :type  description: ``str``

        :param domainid: domain ID of the account owning the affinity group
        :type  domainid: ``str``

        :rtype: :class:`CloudStackAffinityGroup`
        z'This Affinity Group name already exists)r“   r2   ÚcreateAffinityGroupr­  r®  Úaffinitygroup)Úex_list_affinity_groupsr“   r   r2   r   Ú_to_affinity_group)r£   r“   ru  r/  r°  r  s         r   Úex_create_affinity_groupz-CloudStackNodeDriver.ex_create_affinity_groupó  s†   € ð( ×.Ò.Ñ0Ô0ð 	Oð 	OˆBØ�r”wŠˆÝ#Ð$MÑNÔNÐNð ð ¨
¬Ð8Ð8ˆà×$Ò$Ð-BÈ6ÐZ_Ð$Ñ`Ô`ˆà×&Ò& v¨oÔ'>Ñ?Ô?Ð?r¤   c                 óL   — |                       dd|j        id¬¦  «        d         S )z¾
        Delete an Affinity Group

        :param affinity_group: Instance of affinity group
        :type  affinity_group: :class:`CloudStackAffinityGroup`

        :rtype ``bool``
        ÚdeleteAffinityGrouprÐ   r­  r®  rÆ  r?  )r£   Úaffinity_groups     r   Úex_delete_affinity_groupz-CloudStackNodeDriver.ex_delete_affinity_group  s<   € ð ×"Ò"Ø)Ø˜.Ô+Ð,Øð #ñ 
ô 
ð ô	ð 	r¤   c                 ó¸   — d                      d„ |D ¦   «         ¦  «        }|                      d|j        |dœd¬¦  «        }|                      |d         ¬¦  «        S )	aû  
        Updates the affinity/anti-affinity group associations of a virtual
        machine. The VM has to be stopped and restarted for the new properties
        to take effect.

        :param node: Node to update.
        :type node: :class:`CloudStackNode`

        :param affinity_group_list: List of CloudStackAffinityGroup to
                                    associate
        :type affinity_group_list: ``list`` of :class:`CloudStackAffinityGroup`

        :rtype :class:`CloudStackNode`
        r$  c              3   ó$   K  — | ]}|j         V — Œd S rÇ   r\  r.  s     r   r0  zECloudStackNodeDriver.ex_update_node_affinity_group.<locals>.<genexpr>/  s$   è è € Ð"GÐ"G¨R 2¤5Ð"GÐ"GÐ"GÐ"GÐ"GÐ"Gr¤   ÚupdateVMAffinityGroup)rÐ   r1  r­  r®  rÑ  r  )r2  r   rÐ   rí  )r£   r—   Úaffinity_group_listÚaffinity_groupsr  s        r   Úex_update_node_affinity_groupz2CloudStackNodeDriver.ex_update_node_affinity_group   sn   € ð Ÿ(š(Ð"GÐ"GÐ3FÐ"GÑ"GÔ"GÑGÔGˆà×$Ò$Ø+Øœ'°ÐGÐGØð %ñ 
ô 
ˆð
 �}Š} &Ð)9Ô":ˆ}Ñ;Ô;Ð;r¤   c                 óÌ   — |                       dd¬¦  «        }|                     d¦  «        sg S g }|d         D ]*}|                     |                      |¦  «        ¦  «         Œ+|S )zc
        List Affinity Groups

        :rtype ``list`` of :class:`CloudStackAffinityGroup`
        ÚlistAffinityGroupsr­  r  ÚcountrX  )r·  r¸  rº  rZ  )r£   r  rd  r/  s       r   rY  z,CloudStackNodeDriver.ex_list_affinity_groups8  s|   € ð ×#Ò#Ð,@ÈÐ#ÑOÔOˆà�zŠz˜'Ñ"Ô"ð 	ØˆIàˆØ˜Ô)ð 	@ð 	@ˆBØ×"Ò" 4×#:Ò#:¸2Ñ#>Ô#>Ñ?Ô?Ð?Ð?àÐr¤   c                 óÌ   — |                       dd¬¦  «        }|                     d¦  «        sg S g }|d         D ]*}|                     t          |d         ¦  «        ¦  «         Œ+|S )zm
        List Affinity Group Types

        :rtype ``list`` of :class:`CloudStackAffinityGroupTypes`
        ÚlistAffinityGroupTypesr­  r  rh  ÚaffinityGroupTyper2   )r·  r¸  rº  rx  )r£   r  Úaffinity_group_typesÚagts       r   Úex_list_affinity_group_typesz1CloudStackNodeDriver.ex_list_affinity_group_typesI  s}   € ð ×#Ò#Ð,DÈUÐ#ÑSÔSˆà�zŠz˜'Ñ"Ô"ð 	ØˆIà!ÐØÐ-Ô.ð 	Rð 	RˆCØ ×'Ò'Õ(CÀCÈÄKÑ(PÔ(PÑQÔQÐQÐQà#Ð#r¤   c                 ó  — |€|                       ¦   «         d         }||||j        dœ}|                     dd¦  «        |d<   |d         r,|                     dd¦  «        }|st          d¦  «        ‚||d<   |                      d|¬	¦  «        S )
ab  
        Registers an existing ISO by URL.

        :param      name: Name which should be used
        :type       name: ``str``

        :param      url: Url should be used
        :type       url: ``str``

        :param      location: Location which should be used
        :type       location: :class:`NodeLocation`

        :rtype: ``str``
        Nr   )r“   r  r¥  rE   ÚbootableFÚostypeidz'If bootable=True, ostypeid is required!ÚregisterIsor­  )rÈ  rÐ   Úpopr   r·  )r£   r“   r¥  r¼  r§  r°  Ú
os_type_ids          r   Úex_register_isoz$CloudStackNodeDriver.ex_register_isoZ  s¦   € ð ÐØ×*Ò*Ñ,Ô,¨QÔ/ˆHà¨t¸CÈ8Ì;ÐWÐWˆØ#ŸZšZ¨
°EÑ:Ô:ˆˆzÑØ�*Ôð 	,ØŸš J°Ñ5Ô5ˆJàð OÝ#Ð$MÑNÔNÐNà!+ˆF�:Ñà×!Ò!¨-ÀÐ!ÑGÔGÐGr¤   c                 ó  — |                       dd¬¦  «        }i }dddddd	d
ddddddœ}|                     dg ¦  «        D ]F}|                     t          |d         ¦  «        d¦  «        }|sŒ.t          |d         ¦  «        ||<   ŒG|S )a¡  
        Extra call to get account's resource limits, such as
        the amount of instances, volumes, snapshots and networks.

        CloudStack uses integers as the resource type so we will convert
        them to a more human readable string using the resource map

        A list of the resource type mappings can be found at
        http://goo.gl/17C6Gk

        :return: dict
        :rtype: ``dict``
        ÚlistResourceLimitsr­  r  Úmax_instancesÚmax_public_ipsÚmax_volumesÚmax_snapshotsÚ
max_imagesÚmax_projectsÚmax_networksÚmax_vpcÚmax_cpuÚ
max_memoryÚmax_primary_storageÚmax_secondary_storage)r   r•  é   é   é   é   é   é   é   é	   é
   é   ÚresourcelimitÚresourcetypeNÚmax)r·  r¸  r   )r£   r  ÚlimitsÚresource_mapÚlimitÚresources         r   Ú	ex_limitszCloudStackNodeDriver.ex_limitsx  s¼   € ð ×#Ò#Ð,@ÈÐ#ÑOÔOˆàˆàØØØØØØØØØØ%Ø'ð
ð 
ˆð —Z’Z °Ñ4Ô4ð 	1ð 	1ˆEà#×'Ò'­¨E°.Ô,AÑ(BÔ(BÀDÑIÔIˆHØð ØÝ" 5¨¤<Ñ0Ô0ˆF�8ÑÐàˆr¤   c                 ó¼   — |d                      |¦  «        dœ}t          |¦  «        D ]\  }}||d|z  <   ||         |d|z  <   Œ|                      d|d¬¦  «         dS )	a  
        Create tags for a resource (Node/StorageVolume/etc).
        A list of resource types can be found at http://goo.gl/6OKphH

        :param resource_ids: Resource IDs to be tagged. The resource IDs must
                             all be associated with the resource_type.
                             For example, for virtual machines (UserVm) you
                             can only specify a list of virtual machine IDs.
        :type  resource_ids: ``list`` of resource IDs

        :param resource_type: Resource type (eg: UserVm)
        :type  resource_type: ``str``

        :param tags: A dictionary or other mapping of strings to strings,
                     associating tag names with tag values.
        :type  tags: ``dict``

        :rtype: ``bool``
        r$  ©r�  Úresourceidsztags[%d].keyztags[%d].valueÚ
createTagsr­  r®  T©r2  Ú	enumerater   )r£   Úresource_idsÚresource_typer}   r°  Úir˜  s          r   Úex_create_tagsz#CloudStackNodeDriver.ex_create_tags¢  s|   € ð( #0ÀÇÂÈÑ@VÔ@VÐWÐWˆå ‘o”oð 	5ð 	5‰FˆAˆsØ),ˆF�> AÑ%Ñ&Ø+/°¬9ˆFÐ# aÑ'Ñ(Ð(à×Ò L¸ÈÐÑNÔNÐNØˆtr¤   c                 ó    — |d                      |¦  «        dœ}t          |¦  «        D ]\  }}||d|z  <   Œ|                      d|d¬¦  «         dS )a·  
        Delete tags from a resource.

        :param resource_ids: Resource IDs to be tagged. The resource IDs must
                             all be associated with the resource_type.
                             For example, for virtual machines (UserVm) you
                             can only specify a list of virtual machine IDs.
        :type  resource_ids: ``list`` of resource IDs

        :param resource_type: Resource type (eg: UserVm)
        :type  resource_type: ``str``

        :param tag_keys: A list of keys to delete. CloudStack only requires
                         the keys from the key/value pair.
        :type  tag_keys: ``list``

        :rtype: ``bool``
        r$  r—  ztags[%s].keyÚ
deleteTagsr­  r®  Trš  )r£   rœ  r�  Útag_keysr°  rž  r˜  s          r   Úex_delete_tagsz#CloudStackNodeDriver.ex_delete_tags¿  sj   € ð& #0ÀÇÂÈÑ@VÔ@VÐWÐWˆå Ñ)Ô)ð 	-ð 	-‰FˆAˆsØ),ˆF�> AÑ%Ñ&Ð&à×Ò L¸ÈÐÑNÔNÐNàˆtr¤   c                 óž   — |                       dd¬¦  «        }g }|d         D ]*}|                     |                      |¦  «        ¦  «         Œ+|S )z^
        Describe all snapshots.

        :rtype: ``list`` of :class:`VolumeSnapshot`
        ÚlistSnapshotsr­  )r±  r”  )r·  rº  Ú_to_snapshot)r£   Ú	snapshotsÚlist_snapshotsÚsnaps       r   r¨  z#CloudStackNodeDriver.list_snapshotsÛ  s`   € ð ×&Ò& ¸uÐ&ÑEÔEˆ	Øˆà˜jÔ)ð 	;ð 	;ˆDØ×!Ò! $×"3Ò"3°DÑ"9Ô"9Ñ:Ô:Ð:Ð:ØÐr¤   c                 óv   — |                       dd|j        id¬¦  «        }|                      |d         ¦  «        S )aR  
        Create snapshot from volume

        :param      volume: Instance of ``StorageVolume``
        :type       volume: ``StorageVolume``

        :param      name: The name of the snapshot is disregarded
                          by CloudStack drivers
        :type       name: `str`

        :rtype: :class:`VolumeSnapshot`
        ÚcreateSnapshotÚvolumeidr­  r®  r”  )r   rÐ   r¦  )r£   r˜   r“   r”  s       r   Úcreate_volume_snapshotz+CloudStackNodeDriver.create_volume_snapshotè  sG   € ð ×&Ò&Ø$¨j¸&¼)Ð-DÈUð 'ñ 
ô 
ˆð × Ò  ¨*Ô!5Ñ6Ô6Ð6r¤   c                 óD   — |                       dd|j        id¬¦  «         dS )NÚdeleteSnapshotrÐ   r­  r®  Tr?  )r£   r”  s     r   Údestroy_volume_snapshotz,CloudStackNodeDriver.destroy_volume_snapshotú  s+   € Ø×ÒÐ$4¸dÀHÄKÐ=PÐY^ÐÑ_Ô_Ð_Øˆtr¤   c                 ó  — |s|}|                       d||||j        dœ¬¦  «        }|                     d¦  «        }|d         |d         |d         |d         d	œ}t          |d
         |d         | j        j        |¬¦  «        S )a¬  
        Create a template from a snapshot

        :param      snapshot: Instance of ``VolumeSnapshot``
        :type       volume: ``VolumeSnapshot``

        :param  name: the name of the template
        :type   name: ``str``

        :param  name: the os type id
        :type   name: ``str``

        :param  name: the display name of the template
        :type   name: ``str``

        :rtype: :class:`NodeImage`
        ÚcreateTemplate)r  r“   rq  Ú
snapshotidr­  r½   rX   r²  r³  r  r´  rÐ   r“   r¶  )r   rÐ   r¸  r   r»  r    )r£   r”  r“   rq  r  Úrespr¿  r  s           r   Úex_create_snapshot_templatez0CloudStackNodeDriver.ex_create_snapshot_templateþ  s«   € ð$ ð 	ØˆKØ×"Ò"Ø$à*ØØ$Ø&œkð	ð ð #ñ 
ô 
ˆð �hŠh�zÑ"Ô"ˆà˜lÔ+Ø˜(”mØ�lÔ#Ø˜}Ô-ð	
ð 
ˆõ ˜C œI¨C°¬KÀÄÔ@VÐ^cÐdÑdÔdÐdr¤   c                 ó<   — |                       d¦  «        }|d         S )zg
        List all registered os types (needed for snapshot creation)

        :rtype: ``list``
        ÚlistOsTypesÚostyperL  )r£   Úostypess     r   Úex_list_os_typesz%CloudStackNodeDriver.ex_list_os_types$  s"   € ð ×$Ò$ ]Ñ3Ô3ˆØ�xÔ Ð r¤   c                 ón  — |                       dd|j        id¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]m}|                      ||¦  «        }|                     t          |d         |d         |d         |d	         |d
         |d         |d         | |¬¦	  «	        ¦  «         Œn|S )z´
        List the available networks

        :param      vm: Node Object
        :type       vm: :class:`CloudStackNode

        :rtype ``list`` of :class:`CloudStackNic`
        ÚlistNicsr]   r­  r®  rZ   rÐ   rÎ  r>   r=   rÐ  Ú	isdefaultÚ
macaddressr*  )r·  rÐ   r¸  rU  rV  rº  r(  )r£   r—   rC  rî  ÚnicsrY  r0  r  s           r   Úex_list_nicsz!CloudStackNodeDriver.ex_list_nics-  sä   € ð × Ò ØÐ(:¸D¼GÐ'DÈUð !ñ 
ô 
ˆð —’˜˜rÑ"Ô"ˆàˆÝ1°%Ô8ˆ	Øð 	ð 	ˆDØ×(Ò(¨¨yÑ9Ô9ˆEà�KŠKÝØ˜D”zØ# KÔ0Ø! )œ_Ø  œOØ# KÔ0Ø# KÔ0Ø $ \Ô 2ØØð
ñ 
ô 
ñô ð ð ð ˆr¤   c                 ó`   — |j         |j         dœ}|�||d<   |                      d|¬¦  «         dS )a_  
        Add an extra Nic to a VM

        :param  network: NetworkOffering object
        :type   network: :class:'CloudStackNetwork`

        :param  node: Node Object
        :type   node: :class:'CloudStackNode`

        :param  ip_address: Optional, specific IP for this Nic
        :type   ip_address: ``str``


        :rtype: ``bool``
        )r]   rÎ  NrÐ  ÚaddNicToVirtualMachiner­  Tr:  )r£   r—   r–   r,  r¦  s        r   Úex_attach_nic_to_nodez*CloudStackNodeDriver.ex_attach_nic_to_nodeQ  sD   € ð" %)¤G¸'¼*ÐEÐEˆàÐ!Ø *ˆD�Ñà×ÒÐ$<ÀTÐÑJÔJÐJØˆtr¤   c                 óN   — |                       d|j        |j        dœ¬¦  «         dS )zâ
        Remove Nic from a VM

        :param  nic: Nic object
        :type   nic: :class:'CloudStackNetwork`

        :param  node: Node Object
        :type   node: :class:'CloudStackNode`

        :rtype: ``bool``
        ÚremoveNicFromVirtualMachine)Únicidr]   r­  Tr?  )r£   rZ   r—   s      r   Úex_detach_nic_from_nodez,CloudStackNodeDriver.ex_detach_nic_from_nodej  s:   € ð 	×ÒØ1Ø œV¸¼ÐAÐAð 	ñ 	
ô 	
ð 	
ð
 ˆtr¤   c                 óð  — i }|�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d	<   |	�|	|d
<   |
�|
|d<   |�||d<   |                       d|d¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]f}|                      ||¦  «        }|                     t          |d         |d         |d         |d         |d         |d         | |¬¦  «        ¦  «         Œg|S )aO  
        List VPN Gateways.

        :param   account: List resources by account (must be
                          used with the domain_id parameter).
        :type    account: ``str``

        :param   domain_id: List only resources belonging
                            to the domain specified.
        :type    domain_id: ``str``

        :param   for_display: List resources by display flag (only root
                              admin is eligible to pass this parameter).
        :type    for_display: ``bool``

        :param   id: ID of the VPN Gateway.
        :type    id: ``str``

        :param   is_recursive: Defaults to False, but if true, lists all
                               resources from the parent specified by the
                               domain ID till leaves.
        :type    is_recursive: ``bool``

        :param   keyword: List by keyword.
        :type    keyword: ``str``

        :param   list_all: If set to False, list only resources belonging to
                           the command's caller; if set to True - list
                           resources that the caller is authorized to see.
                           Default value is False.
        :type    list_all: ``str``

        :param   page: Start from page.
        :type    page: ``int``

        :param   page_size: Items per page.
        :type    page_size: ``int``

        :param   project_id: List objects by project.
        :type    project_id: ``str``

        :param   vpc_id: List objects by VPC.
        :type    vpc_id: ``str``

        :rtype: ``list`` of :class:`CloudStackVpnGateway`
        Nrg   rc   r�   rÐ   rï  rð  rñ  rò  ró  r@   r?   ÚlistVpnGatewaysr­  r®  rš   rb   r{  r?  )r·  r¸  rU  rV  rº  r=  )r£   rg   re   r�   rÐ   rü  rð  rý  rò  rþ  rB   rA   r¦  rC  rî  Úvpn_gatewaysrY  r0  r  s                      r   ra  z)CloudStackNodeDriver.ex_list_vpn_gateways~  s~  € ðx ˆàÐØ%ˆD�‰OàÐ Ø(ˆD�ÑàÐ"Ø!,ˆD�Ñàˆ>ØˆD�‰JàÐ#Ø".ˆD�ÑàÐØ%ˆD�‰OàÐØ&ˆD�‰OàÐØˆD�‰LàÐ Ø(ˆD�ÑàÐ!Ø *ˆD�ÑàÐØ"ˆD�‰Mà× Ò Ð):À4ÐPUÐ ÑVÔVˆà—’˜ bÑ)Ô)ˆØˆÝ1°,Ô?ˆ	àð 	ð 	ˆDØ×(Ò(¨¨yÑ9Ô9ˆEà×ÒÝ$Ø˜D”zØ  œOØ œ>Ø" :Ô.Ø" :Ô.Ø œ=ØØð	ñ 	ô 	ñô ð ð ð Ðr¤   c                 ó  — d|j         i}|�||d<   |                      d|d¬¦  «        }|d         }t          d         }t          |d         |d	         |d
         |d         |d         |j         | |                      ||¦  «        ¬¦  «        S )a-  
        Creates a VPN Gateway.

        :param vpc: VPC to create the Gateway for (required).
        :type  vpc: :class: `CloudStackVPC`

        :param for_display: Display the VPC to the end user or not.
        :type  for_display: ``bool``

        :rtype: :class: `CloudStackVpnGateway`
        r?   Nr�   ÚcreateVpnGatewayr­  r®  rš   rÐ   rg   rb   rc   r{  r?  )rÐ   r   rU  r=  rV  )r£   r™   r�   r¦  rC  r0  rY  s          r   Úex_create_vpn_gatewayz*CloudStackNodeDriver.ex_create_vpn_gatewayõ  s«   € ð �S”Vð
ˆð Ð"Ø!,ˆD�Ñà×!Ò!Ð*<ÀTÐRWÐ!ÑXÔXˆà�<Ô ˆÝ1°,Ô?ˆ	å#Ø�DŒzØ˜”OØ˜”>Ø˜:Ô&Ø˜:Ô&Ø”6ØØ×&Ò& t¨YÑ7Ô7ð	
ñ 	
ô 	
ð 		
r¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )zµ
        Deletes a VPN Gateway.

        :param vpn_gateway: The VPN Gateway (required).
        :type  vpn_gateway: :class:`CloudStackVpnGateway`

        :rtype: ``bool``
        ÚdeleteVpnGatewayrÐ   r­  r®  rÆ  r?  )r£   rD  rC  s      r   rE  z*CloudStackNodeDriver.ex_delete_vpn_gateway  s8   € ð ×!Ò!Ø&°°k´nÐ/EÈeð "ñ 
ô 
ˆð �9Œ~Ðr¤   c
                 óÔ  — i }
|�||
d<   |�||
d<   |�||
d<   |�||
d<   |�||
d<   |�||
d<   |�||
d<   |�||
d	<   |	�|	|
d
<   |                       d|
d¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]f}|                      ||¦  «        }|                     t          |d         |d         |d         |d         |d         |d         | |¬¦  «        ¦  «         Œg|S )a`  
        List VPN Customer Gateways.

        :param   account: List resources by account (must be
                          used with the domain_id parameter).
        :type    account: ``str``

        :param   domain_id: List only resources belonging
                            to the domain specified.
        :type    domain_id: ``str``

        :param   id: ID of the VPN Customer Gateway.
        :type    id: ``str``

        :param   is_recursive: Defaults to False, but if true, lists all
                               resources from the parent specified by the
                               domain_id till leaves.
        :type    is_recursive: ``bool``

        :param   keyword: List by keyword.
        :type    keyword: ``str``

        :param   list_all: If set to False, list only resources belonging to
                           the command's caller; if set to True - list
                           resources that the caller is authorized to see.
                           Default value is False.
        :type    list_all: ``str``

        :param   page: Start from page.
        :type    page: ``int``

        :param   page_size: Items per page.
        :type    page_size: ``int``

        :param   project_id: List objects by project.
        :type    project_id: ``str``

        :rtype: ``list`` of :class:`CloudStackVpnCustomerGateway`
        Nrg   rc   rÐ   rï  rð  rñ  rò  ró  r@   ÚlistVpnCustomerGatewaysr­  r®  r›   rØ  Ú	esppolicyr=   Ú	ikepolicyÚipsecpskrL  )r·  r¸  rU  rV  rº  rJ  )r£   rg   re   rÐ   rü  rð  rý  rò  rþ  rB   r¦  rC  rî  Úvpn_customer_gatewaysrY  r0  r  s                    r   r]  z2CloudStackNodeDriver.ex_list_vpn_customer_gateways'  sd  € ðf ˆàÐØ%ˆD�‰OàÐ Ø(ˆD�Ñàˆ>ØˆD�‰JàÐ#Ø".ˆD�ÑàÐØ%ˆD�‰OàÐØ&ˆD�‰OàÐØˆD�‰LàÐ Ø(ˆD�ÑàÐ!Ø *ˆD�Ñà× Ò Ð)BÈ4ÐX]Ð Ñ^Ô^ˆà—’Ð,¨bÑ1Ô1ˆØ "ÐÝ1Ð2FÔGˆ	àð 	ð 	ˆDØ×(Ò(¨¨yÑ9Ô9ˆEà!×(Ò(Ý,Ø˜D”zØ" :Ô.Ø# KÔ0Ø  œOØ# KÔ0Ø" :Ô.ØØð	ñ 	ô 	ñô ð ð ð %Ð$r¤   c                 ó"  — |||||dœ}|�||d<   |�||d<   |�||d<   |	�|	|d<   |
�|
|d<   |�||d<   |                       d	|d
¬¦  «        }|d         }t          d         }t          |d         |||||| |                      ||¦  «        ¬¦  «        S )aˆ  
        Creates a VPN Customer Gateway.

        :param cidr_list: Guest CIDR list of the Customer Gateway (required).
        :type  cidr_list: ``str``

        :param esp_policy: ESP policy of the Customer Gateway (required).
        :type  esp_policy: ``str``

        :param gateway: Public IP address of the Customer Gateway (required).
        :type  gateway: ``str``

        :param ike_policy: IKE policy of the Customer Gateway (required).
        :type  ike_policy: ``str``

        :param ipsec_psk: IPsec preshared-key of the Customer Gateway
                          (required).
        :type  ipsec_psk: ``str``

        :param account: The associated account with the Customer Gateway
                        (must be used with the domain_id param).
        :type  account: ``str``

        :param domain_id: The domain ID associated with the Customer Gateway.
                          If used with the account parameter returns the
                          gateway associated with the account for the
                          specified domain.
        :type  domain_id: ``str``

        :param dpd: If DPD is enabled for the VPN connection.
        :type  dpd: ``bool``

        :param esp_lifetime: Lifetime of phase 2 VPN connection to the
                             Customer Gateway, in seconds.
        :type  esp_lifetime: ``int``

        :param ike_lifetime: Lifetime of phase 1 VPN connection to the
                             Customer Gateway, in seconds.
        :type  ike_lifetime: ``int``

        :param name: Name of the Customer Gateway.
        :type  name: ``str``

        :rtype: :class: `CloudStackVpnCustomerGateway`
        )rØ  rÒ  r=   rÓ  rÔ  Nrg   rc   r�   r‘   r’   r“   ÚcreateVpnCustomerGatewayr­  r®  r›   rÐ   rL  )r   rU  rJ  rV  )r£   rä   rM  r=   rN  rO  rg   re   r�   r”   r•   r“   r¦  rC  r0  rY  s                   r   Úex_create_vpn_customer_gatewayz3CloudStackNodeDriver.ex_create_vpn_customer_gateway�  só   € ðx "Ø#ØØ#Ø!ð
ð 
ˆð ÐØ%ˆD�‰OàÐ Ø(ˆD�Ñàˆ?ØˆD�‰KàÐ#Ø".ˆD�ÑàÐ#Ø".ˆD�ÑàÐØˆD�‰Là×!Ò!Ð*DÈTÐZ_Ð!Ñ`Ô`ˆàÐ'Ô(ˆÝ1Ð2FÔGˆ	å+Ø�DŒzØØ!ØØ!ØØØ×&Ò& t¨YÑ7Ô7ð	
ñ 	
ô 	
ð 		
r¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )zá
        Deletes a VPN Customer Gateway.

        :param vpn_customer_gateway: The VPN Customer Gateway (required).
        :type  vpn_customer_gateway: :class:`CloudStackVpnCustomerGateway`

        :rtype: ``bool``
        ÚdeleteVpnCustomerGatewayrÐ   r­  r®  rÆ  r?  )r£   rQ  rC  s      r   rR  z3CloudStackNodeDriver.ex_delete_vpn_customer_gatewayô  s<   € ð ×!Ò!Ø.ØÐ.Ô1Ð2Øð "ñ 
ô 
ˆð �9Œ~Ðr¤   c                 óâ  — i }|�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d<   |�||d	<   |	�|	|d
<   |
�|
|d<   |�||d<   |                       d|d¬¦  «        }|                     dg ¦  «        }g }t          d         }|D ]_}|                      ||¦  «        }|                     t          |d         |d         |d         |d         |d         | |¬¦  «        ¦  «         Œ`|S )aX  
        List VPN Connections.

        :param   account: List resources by account (must be
                          used with the domain_id parameter).
        :type    account: ``str``

        :param   domain_id: List only resources belonging
                            to the domain specified.
        :type    domain_id: ``str``

        :param   for_display: List resources by display flag (only root
                              admin is eligible to pass this parameter).
        :type    for_display: ``bool``

        :param   id: ID of the VPN Connection.
        :type    id: ``str``

        :param   is_recursive: Defaults to False, but if true, lists all
                               resources from the parent specified by the
                               domain_id till leaves.
        :type    is_recursive: ``bool``

        :param   keyword: List by keyword.
        :type    keyword: ``str``

        :param   list_all: If set to False, list only resources belonging to
                           the command's caller; if set to True - list
                           resources that the caller is authorized to see.
                           Default value is False.
        :type    list_all: ``str``

        :param   page: Start from page.
        :type    page: ``int``

        :param   page_size: Items per page.
        :type    page_size: ``int``

        :param   project_id: List objects by project.
        :type    project_id: ``str``

        :param   vpc_id: List objects by VPC.
        :type    vpc_id: ``str``

        :rtype: ``list`` of :class:`CloudStackVpnConnection`
        Nrg   rc   r�   rÐ   rï  rð  rñ  rò  ró  r@   r?   ÚlistVpnConnectionsr­  r®  rœ   rX  Ús2scustomergatewayidÚs2svpngatewayidr/   rW  )r·  r¸  rU  rV  rº  rU  )r£   rg   re   r�   rÐ   rü  rð  rý  rò  rþ  rB   rA   r¦  rC  rî  Úvpn_connectionsrY  r0  r  s                      r   Úex_list_vpn_connectionsz,CloudStackNodeDriver.ex_list_vpn_connections  sy  € ðx ˆàÐØ%ˆD�‰OàÐ Ø(ˆD�ÑàÐ"Ø!,ˆD�Ñàˆ>ØˆD�‰JàÐ#Ø".ˆD�ÑàÐØ%ˆD�‰OàÐØ&ˆD�‰OàÐØˆD�‰LàÐ Ø(ˆD�ÑàÐ!Ø *ˆD�ÑàÐØ"ˆD�‰Mà× Ò Ð)=ÀdÐSXÐ ÑYÔYˆà—’˜¨Ñ,Ô,ˆØˆÝ1°/ÔBˆ	àð 	ð 	ˆDØ×(Ò(¨¨yÑ9Ô9ˆEà×"Ò"Ý'Ø˜D”zØ  œOØ,0Ð1GÔ,HØ#'Ð(9Ô#:Ø˜wœ-ØØðñ ô ñ
ô 
ð 
ð 
ð Ðr¤   c                 ó"  — |j         |j         dœ}|�||d<   |�||d<   |                      d|d¬¦  «        }|d         }t          d         }t          |d	         |d         |j         |j         |d
         | |                      ||¦  «        ¬¦  «        S )aM  
        Creates a VPN Connection.

        :param   vpn_customer_gateway: The VPN Customer Gateway (required).
        :type    vpn_customer_gateway: :class:`CloudStackVpnCustomerGateway`

        :param   vpn_gateway: The VPN Gateway (required).
        :type    vpn_gateway: :class:`CloudStackVpnGateway`

        :param   for_display: Display the Connection to the end user or not.
        :type    for_display: ``str``

        :param   passive: If True, sets the connection to be passive.
        :type    passive: ``bool``

        :rtype: :class: `CloudStackVpnConnection`
        )rÝ  rÞ  Nr�   rX  ÚcreateVpnConnectionr­  r®  rœ   rÐ   r/   rW  )rÐ   r   rU  rU  rV  )	r£   rQ  rD  r�   rX  r¦  rC  r0  rY  s	            r   Úex_create_vpn_connectionz-CloudStackNodeDriver.ex_create_vpn_connection{  s¹   € ð* %9Ô$;Ø*œ~ð
ð 
ˆð
 Ð"Ø!,ˆD�ÑàÐØ%ˆD�‰Oà×!Ò!Ð*?ÈÐUZÐ!Ñ[Ô[ˆà�?Ô#ˆÝ1°/ÔBˆ	å&Ø�DŒzØ˜”OØ$8Ô$;Ø&œ>Ø�w”-ØØ×&Ò& t¨YÑ7Ô7ð
ñ 
ô 
ð 	
r¤   c                 óP   — |                       dd|j        id¬¦  «        }|d         S )zÄ
        Deletes a VPN Connection.

        :param vpn_connection: The VPN Connection (required).
        :type  vpn_connection: :class:`CloudStackVpnConnection`

        :rtype: ``bool``
        ÚdeleteVpnConnectionrÐ   r­  r®  rÆ  r?  )r£   rc  rC  s      r   rd  z-CloudStackNodeDriver.ex_delete_vpn_connection©  s;   € ð ×!Ò!Ø)Ø˜.Ô+Ð,Øð "ñ 
ô 
ˆð �9Œ~Ðr¤   c                 ó¶   — |                      dd¦  «        |                      dd¦  «        |                      dd¦  «        dœ}t          |d         | |¬¦  «        S )z 
        Create snapshot object from data

        :param data: Node data object.
        :type data: ``dict``

        :rtype: :class:`VolumeSnapshot`
        r}   Nr“   r¬  )r}   r“   r®  rÐ   )r    r  )r¸  r   )r£   rÓ  r  s      r   r¦  z!CloudStackNodeDriver._to_snapshotº  s^   € ð —H’H˜V TÑ*Ô*Ø—H’H˜V TÑ*Ô*ØŸš *¨dÑ3Ô3ð
ð 
ˆõ
 ˜d 4œj°¸UÐCÑCÔCÐCr¤   c           
      ó  — |d         }d|v r	|d         }nd|v r	|d         }nd}| j         |d                  }|r|ng }g }|d         D ]S}d|vrŒt          |d         ¦  «        r|                     |d         ¦  «         Œ8|                     |d         ¦  «         ŒT|                     dg ¦  «        }|rd	„ |D ¦   «         }|                     d
g ¦  «        }	|	rd„ |	D ¦   «         }	|                     dd¦  «        }
|                      |t
          d         ¦  «        }||d<   |	|d<   g |d<   g |d<   g |d<   |
|d<   d|v r|                      |d         ¦  «        |d<   t          |||t          t          |¦  «        ¦  «        || |¬¦  «        }|S )zø
        :param data: Node data object.
        :type data: ``dict``

        :param public_ips: A list of additional IP addresses belonging to
                           this node. (optional)
        :type public_ips: ``list`` or ``None``
        rÐ   r“   r#  Nr/   rZ   rÐ  rC  c                 ó   — g | ]
}|d          ‘ŒS r�  rÌ   )rÚ  rH  s     r   rÜ  z1CloudStackNodeDriver._to_node.<locals>.<listcomp>ì  s   € ÐDÐDÐD¨b˜r &œzÐDÐDÐDr¤   rX  c                 ó   — g | ]
}|d          ‘ŒS r\  rÌ   r.  s     r   rÜ  z1CloudStackNodeDriver._to_node.<locals>.<listcomp>ñ  s   € ÐBÐBÐB¨B˜r $œxÐBÐBÐBr¤   r[   Fr—   Úsecurity_groupr^  rÝ  rá  rê  r}   )rÐ   r“   r/   rÔ  Úprivate_ipsr    r  )
ÚNODE_STATE_MAPr   rº  r¸  rV  rU  rW  rž   rì  Úset)r£   rÓ  rÔ  rÐ   r“   r/   rë  rZ   rD  rd  r[   r  r—   s                r   rí  zCloudStackNodeDriver._to_nodeÊ  sÿ  € ð �$ŒZˆà�Tˆ>ˆ>Ø˜”<ˆDˆDØ˜dÐ"Ð"Ø˜Ô&ˆDˆDàˆDàÔ# D¨¤MÔ2ˆà#-Ð5�Z�Z°2ˆ
Øˆà˜”;ð 	4ð 	4ˆCØ #Ð%Ð%ØÝ   [Ô!1Ñ2Ô2ð 4Ø×"Ò" 3 {Ô#3Ñ4Ô4Ð4Ð4à×!Ò! # kÔ"2Ñ3Ô3Ð3Ð3àŸ(š( ?°BÑ7Ô7ˆàð 	EØDÐD°OÐDÑDÔDˆOàŸ(š( ?°BÑ7Ô7ˆàð 	CØBÐB°/ÐBÑBÔBˆOà—(’(˜9 eÑ,Ô,ˆà×$Ò$ TÕ+HÈÔ+PÑQÔQˆð #2ˆÐÑØ"1ˆÐÑØ "ˆˆnÑØ')ˆÐ#Ñ$Ø)+ˆÐ%Ñ&Ø"ˆˆiÑà�Tˆ>ˆ>Ø ×3Ò3°D¸´LÑAÔAˆE�&‰MåØØØÝ�C 
™OœOÑ,Ô,Ø#ØØð
ñ 
ô 
ˆð ˆr¤   c                 ó$   ‡ — ˆ fd„|D ¦   «         }|S )Nc                 ó<   •— g | ]}‰                      |¬ ¦  «        ‘ŒS )r  )r¹  )rÚ  r0  r£   s     €r   rÜ  z6CloudStackNodeDriver._to_key_pairs.<locals>.<listcomp>  s*   ø€ ÐCÐCÐC°d�T×&Ò&¨DÐ&Ñ1Ô1ÐCÐCÐCr¤   rÌ   )r£   rÓ  r¶  s   `  r   r´  z"CloudStackNodeDriver._to_key_pairs  s"   ø€ ØCÐCÐCÐC¸dÐCÑCÔCˆ	ØÐr¤   c           	      ó–   — t          |d         |d         |                     dd ¦  «        |                     dd ¦  «        | ¬¦  «        }|S )Nr“   r+  rÁ  Ú
privatekey)r“   r+  r?  r/  r    )r   r¸  )r£   rÓ  rº  s      r   r¹  z!CloudStackNodeDriver._to_key_pair  sQ   € ÝØ�f”Ø˜]Ô+Ø—x’x ¨TÑ2Ô2ØŸš ¨tÑ4Ô4Øð
ñ 
ô 
ˆð ˆr¤   c                 ó:  — t          |d         |d         t          |d         ¦  «        |                     dd¦  «        |                     dd¦  «        |                     dd¦  «        |                     dd¦  «        |                     d	d¦  «        ¬
¦  «        }|S )NrÐ   r“   r2   rg   Ú rb   rc   r  ÚvirtualmachineIds)rÐ   r“   ru  rg   rb   rc   r  rt  )rr  rx  r¸  )r£   rÓ  r^  s      r   rZ  z'CloudStackNodeDriver._to_affinity_group  s‘   € Ý0Ø�DŒzØ�f”Ý2°4¸´<Ñ@Ô@Ø—H’H˜Y¨Ñ+Ô+Ø—8’8˜H bÑ)Ô)Ø—X’X˜j¨"Ñ-Ô-ØŸš °Ñ3Ô3Ø#ŸxšxÐ(;¸RÑ@Ô@ð	
ñ 	
ô 	
ˆð Ðr¤   c                 ó>   — i }|D ]}|d         }|d         }|||<   Œ|S )zé
        Parse tags from the provided element and return a dictionary with
        key/value pairs.

        :param      tag_set: A list of key/value tag pairs
        :type       tag_set: ``list```

        :rtype: ``dict``
        r˜  r   rÌ   )r£   Útag_setr}   Útagr˜  r   s         r   rW  z'CloudStackNodeDriver._get_resource_tags)  s:   € ð ˆàð 	ð 	ˆCØ�e”*ˆCØ˜”LˆEØˆD�‰IˆIàˆr¤   c                 ó²   — i }|                      ¦   «         D ]?\  }}|d         }|                     |d         d¦  «        }|� ||¦  «        ||<   Œ:d||<   Œ@|S )aa  
        Extract attributes from the element based on rules provided in the
        mapping dictionary.

        :param      response: The JSON response to parse the values from.
        :type       response: ``dict``

        :param      mapping: Dictionary with the extra layout
        :type       mapping: ``dict``

        :rtype: ``dict``
        r"   r!   N)rî  r¸  )r£   ÚresponseÚmappingr  Ú	attributeÚvaluesr"   r   s           r   rV  z$CloudStackNodeDriver._get_extra_dict<  sw   € ð ˆØ!(§¢¡¤ð 	(ð 	(ÑˆI�vØ#Ð$4Ô5ˆNØ—L’L ¨
Ô!3°TÑ:Ô:ˆEàÐ Ø#1 >°%Ñ#8Ô#8��iÑ Ð à#'��iÑ Ð àˆr¤   c                 óœ   — | j                              |d         t          j        ¦  «        }|t          j        k    rd|v rt          j        }|S )Nr/   r]   )ÚVOLUME_STATE_MAPr¸  r   ÚUNKNOWNÚ	AVAILABLEÚINUSE)r£   r«  r/   s      r   r’  z%CloudStackNodeDriver._to_volume_stateU  sK   € ØÔ%×)Ò)¨#¨g¬,Õ8JÔ8RÑSÔSˆð Õ&Ô0Ò0Ð0Ð5GÈ3Ð5NÐ5NÝ&Ô,ˆEàˆr¤   )NTNNNNrÇ   )NN)NNNNNNNNNFNN)F)NNNNNrà   rè   )NNNNNNNNNNN)NNTN)	NNNNNNNNN)NNNNNN)€rÈ   rÉ   rÊ   rË   r“   Úapi_nameÚwebsiter   r¢  r2   Úfeaturesr   ÚRUNNINGÚ	REBOOTINGÚ	MIGRATINGÚSTOPPEDÚPENDINGÚ
TERMINATEDrì  r   ÚCREATINGÚDELETINGÚDELETEDr   ÚBACKUPÚERRORrþ  rÓ   rÀ  rÈ  rù  r  r  r�  r  r<  r@  r¾   rÁ   rÄ   rÆ   rR  r[  rd  rh  rm  rt  rB  r~  r‚  r…  r‹  r™  rž  r£  r¦  rª  r¯  r·  r»  r¾  rÃ  rÈ  rþ  r¡   r§   rÛ  rß  rä  rç  rê  rí  rÿ  r´   r»   r  r­   r¸   r  r  r   r$  r(  r1  r3  r8  r=  r@  rE  rI  rM  rR  rU  r[  r_  re  rY  rn  ru  r•  rŸ  r£  r¨  r­  r°  rµ  rº  rÀ  rÃ  rÇ  ra  rÍ  rE  r]  rØ  rR  rà  rã  rd  r¦  rí  r´  r¹  rZ  rW  rV  r’  Ú__classcell__)rÛ   s   @r   r~  r~  û  su	  ø€ € € € € ð+ð +ð €DØ€HØ&€GØÔ€DàÐ 4Ð5Ð6€Hð Ô$ØÔ'ØÔ(ØÔ$ØÔ%ØÔ)ØÔ&ØÔ%ð	ð 	€Nð 'Ô/Ø(Ô1Ø'Ô0Ø%Ô-Ø&Ô.Ø'Ô1Ø#Ô-Ø*Ô1Ø)Ô/Ø'Ô1ðð Ðð  ØØØØØð9Vð 9Vð 9Vð 9Vð 9Vð 9Vðvð ð ð ð:ð ð ð[ð [ð [ð [ðzKð Kð Kð KðZ	ð 	ð 	ð 	ð  ØØØØØØØØØØØð!Yð Yð Yð YðB ØØØØØØØØØØØð#Ið Ið Ið IðVð ð ð ð,ð ð ð3ð 3ð 3ð 3ð&:ð :ð :ð&.ð .ð .ð(.ð .ð .ðð ð ð,&ð &ð &ð &ðP ð  ð  ð@ ØØØØð_ð _ð _ð _ðBð ð ð ð(ð ð ð( ð  ð  ð  ðDð ð ð ð<9ð 9ð 9ð 9ðvð ð ð"ð ð ð<-
ð -
ð -
ð -
ð^ð ð ðð ð ð ðð ð ð'ð 'ð 'ð 'ðR%ð %ð %ð %ðN3ð 3ð 3ðjð ð ð& ð  ð  ðDð ð ð*(ð (ð (ð8ð ð ð8 ð  ð  ð  ðDð ð ðð ð ðB ØØØð8ð 8ð 8ð 8ðtð ð ðð ð ð: ØØØð;ð ;ð ;ð ;ðzð ð ð$ ØØØØØØØØØØð{ð {ð {ð {ðH ØØØðCð Cð Cð CðJð ð ð, ØØØØØØØØØØðvð vð vð vðp(ð (ð (ð (ðTð ð ð"ð ð ð ð@ ØðEð Eð Eð EðNð ð ð4ð ð ð(ð ð ð:=ð =ð =ð~ ð  ð  ðDð ð ð*ð ð ð*7ð 7ð 7ð45ð 5ð 5ðn$
ð $
ð $
ðLð ð ðF ØØØðkð kð kð kðZð ð ð@ð @ð @ð<ð ð ð<ð <ð <ð0ð ð ð"$ð $ð $ð"Hð Hð Hð Hð<(ð (ð (ðTð ð ð:ð ð ð8ð ð ð7ð 7ð 7ð 7ð$ð ð ð$eð $eð $eð $eðL!ð !ð !ð"ð "ð "ðHð ð ð ð2ð ð ð, ØØØØØØØØØØðuð uð uð uðn!
ð !
ð !
ð !
ðFð ð ð" ØØØØØØØØðf%ð f%ð f%ð f%ð^ ØØØØØðc
ð c
ð c
ð c
ðJð ð ð& ØØØØØØØØØØðtð tð tð tðn LPð,
ð ,
ð ,
ð ,
ð\ð ð ð"Dð Dð Dð Að Að Að AðFð ð ðð ð ðð ð ðð ð ð&ð ð ð2ð ð ð ð ð ð r¤   r~  )4r3  r-  Úlibcloud.utils.py3r   r   Úlibcloud.compute.baser   r   r   r   r	   r
   r   r   Úlibcloud.compute.typesr   r   r   r   Úlibcloud.utils.networkingr   Úlibcloud.common.cloudstackr   Úlibcloud.compute.providersr   r   r   rì  ÚboolrU  rž   rÎ   râ   rë   rð   rø   rþ   r  r  r  r  r(  r3  r8  r=  rJ  rU  rh  rm  rr  rx  r~  rÌ   r¤   r   ú<module>r     s0  ðð" €€€Ø €€€à *Ð *Ð *Ð *Ð *Ð *Ð *Ð *ð	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	ðð ð ð ð ð ð ð ð ð ð ð ð 8Ð 7Ð 7Ð 7Ð 7Ð 7Ø <Ð <Ð <Ð <Ð <Ð <Ø /Ð /Ð /Ð /Ð /Ð /ðð ð ðð!ØØ-Ø!ð"
ð "
ð!ð
 	 ]ÀcÐJÐJð!ð 	 *ÀÐDÐDð!ð 	 Ø-Ø!ð"
ð "
ð!ð 	'Ø4Ø!ð)
ð )
ð!ð 	(Ø5Ø!ð*
ð *
ð!ð& 	 *ÀÐDÐDð'!ð( 	˜g¸Ð=Ð=ð)!ð* 	˜V°sÐ;Ð;ð+!ð, 	˜V°sÐ;Ð;ð-!ð. 	˜V°sÐ;Ð;ð/!ð0 	 ¸cÐBÐBð1!ð2 	Ð):ÈcÐRÐRð3!ð4 	 È#ÐNÐNð5!ð6 	Ð,?ÐSVÐWÐWð7!ð8 	Ð+<ÐPSÐTÐTð9!ð: 	 	¸SÐAÐAð;!ð< !*¸SÐAÐAØ&¸#Ð>Ð>Ø#.À#ÐFÐFðA!ð !ð !ðDØ ¸sÐCÐCðà ¸CÐ@Ð@ðð 	 *ÀÐDÐDðð 	 ¸cÐBÐBð	ð
 	 ¸sÐCÐCðð 	 ÀÐEÐEðð 	 >ÀSÐIÐIðð 	 Ø,Ø!ð"
ð "
ðð 	Ð):ÈcÐRÐRðð 	Ð 3ÀsÐKÐKðð 	Ð"7È3ÐOÐOðð 	 ~ÈÐMÐMðð  	Ð)9ÈSÐQÐQð!ð" 	 <À3ÐGÐGð#ð$ 	 	¸SÐAÐAð%ð& 	 ;À#ÐFÐFð'ð( 	˜e°tÐ<Ð<ð)ð. !*¸SÐAÐAà"Ø8ð
ð 
ð %7È#ÐNÐNØ+>ÐRUÐVÐVØ%¸Ð=Ð=Ø$*¸cÐBÐBØ (¸CÐ@Ð@Ø",ÀÐDÐDðð ð !*¸SÐAÐAØ'¸3Ð?Ð?à"Ø8ð
ð 
ð (7È#ÐNÐNØ%¸Ð=Ð=Ø(7È3ÐOÐOØ",ÀÐDÐDØ (¸CÐ@Ð@ðð ðNØ 	¸SÐAÐAðNàØ&Ø8ð
ð 
ðNð 	Ø"Ø8ð
ð 
ðNð 	Ø"Ø8ð
ð 
ðNð 	˜x¸3Ð?Ð?ðNð 	 ¸sÐCÐCðNð  	Ø%Ø8ð
ð 
ð!Nð( 	Ø!Ø8ð
ð 
ð)Nð0 	Ø!Ø8ð
ð 
ð1Nð8 	Ø)Ø8ð
ð 
ð9Nð@ 	Ø%Ø8ð
ð 
ðANðH 	Ø%Ø8ð
ð 
ðINðP 	Ø*Ø8ð
ð 
ðQNðX 	Ø&Ø8ð
ð 
ðYNð` 	Ø&Ø8ð
ð 
ðaNðh 	"Ø1Ø8ð$
ð $
ðiNðp 	Ø-Ø8ð 
ð  
ðqNð Nðx 	Ø-Ø8ð 
ð  
ðyNð@ 	$Ø3Ø8ð&
ð &
ðANðH 	 Ø/Ø8ð"
ð "
ðINðP 	 Ø/Ø8ð"
ð "
ðQNðX 	Ø+Ø8ð
ð 
ðYNð` 	Ø'Ø8ð
ð 
ðaNðh 	Ø'Ø8ð
ð 
ðiNðp 	˜g¸Ð=Ð=ðqNðr 	˜V°sÐ;Ð;ðsNðt 	Ø+Ø8ð
ð 
ðuNð| 	Ø'Ø8ð
ð 
ð}NðD 	Ø'Ø8ð
ð 
ðENðL 	Ø%Ø8ð
ð 
ðMNðT 	Ø!Ø8ð
ð 
ðUNð\ 	Ø#Ø8ð
ð 
ð]Nðd 	Ø!Ø8ð
ð 
ðeNðl 	Ø)Ø8ð
ð 
ðmNð Nðv &Ø8ð
ð 
ð
 &Ø8ð
ð 
ð
 'Ø8ð
ð 
ð
 #Ø8ð
ð 
ð
 #Ø8ð
ð 
ðUNð Nð Nð^ ¨È$ÐOÐOÐPà$0ÀCÐHÐHØ )¸SÐAÐAØ#.À#ÐFÐFØ )¸SÐAÐAð	ð ð !*¸SÐAÐAØ'¸3Ð?Ð?Ø",ÀÐDÐDØ!°TÐ:Ð:à%Ø8ð
ð 
ð
 &Ø8ð
ð 
ð $°sÐ;Ð;ðð ð  !*¸SÐAÐAØ'¸3Ð?Ð?Ø",ÀÐDÐDØ$0ÀCÐHÐHØ )¸SÐAÐAØ#.À#ÐFÐFðð ðq@!ð @!Ð ðFW.ð W.ð W.ð W.ð W.�Tñ W.ô W.ð W.ðt-Ið -Ið -Ið -Ið -Iñ -Iô -Ið -Ið`;Ið ;Ið ;Ið ;Ið ;Iñ ;Iô ;Ið ;Ið|<Ið <Ið <Ið <Ið <Iñ <Iô <Ið <Ið~+Ið +Ið +Ið +Ið +Iñ +Iô +Ið +Ið\EIð EIð EIð EIð EIñ EIô EIð EIðP$Rð $Rð $Rð $Rð $Rñ $Rô $Rð $RðN?Ið ?Ið ?Ið ?Ið ?Iñ ?Iô ?Ið ?IðDIð Ið Ið Ið Iñ Iô Ið Ið
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð:&
ð &
ð &
ð &
ð &
ñ &
ô &
ð &
ðR,Ið ,Ið ,Ið ,Ið ,Iñ ,Iô ,Ið ,Ið^%
ð %
ð %
ð %
ð %
ñ %
ô %
ð %
ðP
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð*'
ð '
ð '
ð '
ð '
ñ '
ô '
ð '
ðT)
ð )
ð )
ð )
ð )
ñ )
ô )
ð )
ðX6
ð 6
ð 6
ð 6
ð 6
ñ 6
ô 6
ð 6
ðr
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð4
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ð*A
ð A
ð A
ð A
ð A
ñ A
ô A
ð A
ðHFð Fð Fð Fð Fñ Fô Fð Fð.b9ð b9ð b9ð b9ð b9Ð0°*ñ b9ô b9ð b9ð b9ð b9r¤   