%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/states/ |
Current File : //usr/lib/python2.7/site-packages/salt/states/ethtool.pyc |
� ���^c @@ su d Z d d l m Z m Z m Z d d l Z d d l m Z e j e � Z d � Z d � Z d � Z d � Z d S( u� Configuration of network device .. versionadded:: 2016.11.0 :codeauthor: Krzysztof Pawlowski <msciciel@msciciel.eu> :maturity: new :depends: python-ethtool :platform: linux .. code-block:: yaml eth0: ethtool.coalesce: - name: eth0 - rx_usecs: 24 - tx_usecs: 48 eth0: ethtool.ring: - name: eth0 - rx: 1024 - tx: 1024 eth0: ethtool.offload: - name: eth0 - tcp_segmentation_offload: on i ( t absolute_importt print_functiont unicode_literalsN( t sixc C@ s d t k r d St S( u Provide ethtool state u ethtool.show_driveru ethtool( t __salt__t False( ( ( s7 /usr/lib/python2.7/site-packages/salt/states/ethtool.pyt __virtual__, s c K@ s i | d 6i d 6t d 6d j | � d 6} t } d | k rV t j d t � | d <n y<t d | � } t | t � s� t | d <d j | � | d <| Si } g } xf | j � D]X \ } } | | k r� | | | k r� | j i | | 6� | j d j | | � � q� q� W| d rX| s"| S| rXd | d <d j | d j | � � | d <| Sn | r�t } d j | � | d <d j | � | d d <n Wn1 t k r�} t | d <t j | � | d <| SX| ry t d | | � Wqt k r} t | d <t j | � | d <| SXn | S( um Manage coalescing settings of network device name Interface name to apply coalescing settings .. code-block:: yaml eth0: ethtool.coalesce: - name: eth0 - adaptive_rx: on - adaptive_tx: on - rx_usecs: 24 - rx_frame: 0 - rx_usecs_irq: 0 - rx_frames_irq: 0 - tx_usecs: 48 - tx_frames: 0 - tx_usecs_irq: 0 - tx_frames_irq: 0 - stats_block_usecs: 0 - pkt_rate_low: 0 - rx_usecs_low: 0 - rx_frames_low: 0 - tx_usecs_low: 0 - tx_frames_low: 0 - pkt_rate_high: 0 - rx_usecs_high: 0 - rx_frames_high: 0 - tx_usecs_high: 0 - tx_frames_high: 0 - sample_interval: 0 u nameu changesu resultu6 Network device {0} coalescing settings are up to date.u commentu testu ethtool.show_coalesceu0 Device {0} coalescing settings are not supportedu {0}: {1}u9 Device {0} coalescing settings are set to be updated: {1}u u'