%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/neutron_secgroup.pyo |
� ���^c @@ sM d Z d d l m Z m Z m Z d Z d � Z d d � Z d d � Z d S( u� Management of OpenStack Neutron Security Groups =============================================== .. versionadded:: 2018.3.0 :depends: shade :configuration: see :py:mod:`salt.modules.neutronng` for setup instructions Example States .. code-block:: yaml create security group; neutron_secgroup.present: - name: security_group1 - description: "Very Secure Security Group" delete security group: neutron_secgroup.absent: - name_or_id: security_group1 - project_name: Project1 create security group with optional params: neutron_secgroup.present: - name: security_group1 - description: "Very Secure Security Group" - project_id: 1dcac318a83b4610b7a7f7ba01465548 create security group with optional params: neutron_secgroup.present: - name: security_group1 - description: "Very Secure Security Group" - project_name: Project1 i ( t absolute_importt print_functiont unicode_literalsu neutron_secgroupc C@ s d t k r t St d f S( Nu neutronng.list_subnetsuf The neutronng execution module failed to load: shade python module is not available( t __salt__t __virtualname__t False( ( ( s@ /usr/lib/python2.7/site-packages/salt/states/neutron_secgroup.pyt __virtual__+ s c K@ s� i | d 6i d 6t d 6d d 6} t d | � } t d | � d | k rd | d | d <| d =n t d d | d � } | d k r� t | d <d | d <| St d d | d i | j d 6� } | d k r(t d t k r d | d <| | d <d | d <| St d | � } | | d <d | d <| St d | | � } | r�t d t k rsd | d <| | d <d | d <| St d d | | � | d j | � d | d <n | S( u� Ensure a security group exists. You can supply either project_name or project_id. Creating a default security group will not show up as a change; it gets created through the lookup process. name Name of the security group description Description of the security group project_name Name of Project project_id ID of Project u nameu changesu resultu u commentu args.clean_kwargsu neutronng.setup_cloudsu project_nameu project_idu keystoneng.project_gett nameu project does not existu neutronng.security_group_gett filtersu tenant_idu testu Security Group will be created.u neutronng.security_group_createu Created security groupu neutronng.compare_changesu Security Group will be updated.u neutronng.security_group_updatet secgroupu Updated security groupN( t Truet __utils__R t NoneR t idt __opts__t update( R t autht kwargst rett projectR t changes( ( s@ /usr/lib/python2.7/site-packages/salt/states/neutron_secgroup.pyt present2 sL c K@ s� i | d 6i d 6t d 6d d 6} t d | � } t d | � t d d | d � | d <t d d | d i | d d 6� } | r� t d t k r� d | d <i | j d 6| d <d | d <| St d d | � | | d d <d | d <n | S( u^ Ensure a security group does not exist name Name of the security group u nameu changesu resultu u commentu args.clean_kwargsu neutronng.setup_cloudsu keystoneng.project_getR u project_nameu project_idu neutronng.security_group_getR u testu idu Security group will be deleted.u neutronng.security_group_deleteu Deleted security groupN( R R R R R R ( R R R R R ( ( s@ /usr/lib/python2.7/site-packages/salt/states/neutron_secgroup.pyt absent{ s* N( t __doc__t __future__R R R R R R R R ( ( ( s@ /usr/lib/python2.7/site-packages/salt/states/neutron_secgroup.pyt <module>$ s I