/usr/lib/python2.6/site-packages/openstackclient/compute/v2
Edit: /usr/lib/python2.6/site-packages/openstackclient/compute/v2/console.pyc (3690B)
Ñò
;vVc @ s d Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l Z d e i f d „ ƒ YZ
d e i f d „ ƒ YZ d S(
s) Compute v2 Console action implementationsiÿÿÿÿN( t command( t show( t utilst ShowConsoleLogc B sB e Z d Z e i e d ƒ Z d „ Z e i e ƒ d „ ƒ Z RS( s Show server's console outputs .ShowConsoleLogc
C sZ t t | ƒ i | ƒ } | i d d d d d ƒ| i d d d d t d d d d
ƒ| S( Nt servert metavars
t helps' Server to show console log (name or ID)s --liness t typet defaults@ Number of lines to display from the end of the log (default=all)( t superR t
get_parsert add_argumentt intt None( t selft prog_namet parser( ( sR /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/compute/v2/console.pyR
! s c C sk | i i i } t i | i | i ƒ } | i } | o | d 7} n | i d | ƒ } t i
i | ƒ d S( Ni t length( t appt client_managert computeR t
find_resourcet serversR t linest get_console_outputt syst stdoutt write( R t parsed_argst compute_clientR R t data( ( sR /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/compute/v2/console.pyt take_action2 s (
t __name__t
__module__t __doc__t loggingt getLoggert logR
R t
log_methodR ( ( ( sR /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/compute/v2/console.pyR s t ShowConsoleURLc B sB e Z d Z e i e d ƒ Z d „ Z e i e ƒ d „ ƒ Z RS( s Show server's remote console URLs .ShowConsoleURLc C s¶ t t | ƒ i | ƒ } | i d d d d d ƒ| i ƒ } | i d d d d d
d d d
d d d ƒ| i d d d d d
d d d d ƒ| i d d d d d
d d d d ƒ| S( NR R s R s Server to show URL (name or ID)s --novnct destt url_typet actiont store_constt constt novncR s Show noVNC console URL (default)s --xvpvnct xvpvncs Show xpvnc console URLs --spicet spices Show SPICE console URL( R R' R
R t add_mutually_exclusive_group( R R R t
type_group( ( sR /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/compute/v2/console.pyR
J s4 c C sµ | i i i } t i | i | i ƒ } | i d j o | i | i ƒ } n | i d j o | i | i ƒ } n | p h h f Sh } | i
| d ƒ t t t
i | ƒ ƒ Œ S( NR- R. R/ t console( s novncs xvpvnc( s spice( R R R R R R R R) t get_vnc_consolet get_spice_consolet updatet zipt sortedt sixt iteritems( R R R R R t info( ( sR /tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/compute/v2/console.pyR j s (
R R! R" R# R$ R% R
R R&