<s> '''<STR_LIT>''' <EOL> from __future__ import absolute_import <EOL> import logging <EOL> log = logging . getLogger ( __name__ ) <EOL> def __virtual__ ( ) : <EOL> '''<STR_LIT>''' <EOL> return '<STR_LIT>' in __salt__ <EOL> def cert ( name , <EOL> aliases = None , <EOL> email = None , <EOL> webroot = None , <EOL> test_cert = False , <EOL> renew = None , <EOL> keysize = None , <EOL> server = None , <EOL> owner = '<STR_LIT:root>' , <EOL> group = '<STR_LIT:root>' ) : <EOL> '''<STR_LIT>''' <EOL> if __opts__ [ '<STR_LIT:test>' ] : <EOL> ret = { <EOL> '<STR_LIT:name>' : name , <EOL> '<STR_LIT>' : { } , <EOL> '<STR_LIT:result>' : None <EOL> } <EOL> window = None <EOL> try : <EOL> window = int ( renew ) <EOL> except : <EOL> pass <EOL> comment = '<STR_LIT>' . format ( name ) <EOL> if not __salt__ [ '<STR_LIT>' ] ( name ) : <EOL> comment += '<STR_LIT>' <EOL> elif __salt__ [ '<STR_LIT>' ] ( name , window ) : <EOL> comment += '<STR_LIT>' <EOL> else : <EOL> comment += '<STR_LIT>' <EOL> ret [ '<STR_LIT>' ] = comment <EOL> return ret <EOL> if not __salt__ [ '<STR_LIT>' ] ( name ) : <EOL> old = None <EOL> else : <EOL> old = __salt__ [ '<STR_LIT>' ] ( name ) <EOL> res = __salt__ [ '<STR_LIT>' ] ( <EOL> name , <EOL> aliases = aliases , <EOL> email = email , <EOL> webroot = webroot , <EOL> test_cert = test_cert , <EOL> renew = renew , <EOL> keysize = keysize , <EOL> server = server , <EOL> owner = owner , <EOL> group = group <EOL> ) <EOL> ret = { <EOL> '<STR_LIT:name>' : name , <EOL> '<STR_LIT:result>' : res [ '<STR_LIT:result>' ] is not False , <EOL> '<STR_LIT>' : res [ '<STR_LIT>' ] <EOL> } <EOL> if res [ '<STR_LIT:result>' ] is None : <EOL> ret [ '<STR_LIT>' ] = { } <EOL> else : <EOL> ret [ '<STR_LIT>' ] = { <EOL> '<STR_LIT>' : old , <EOL> '<STR_LIT>' : __salt__ [ '<STR_LIT>' ] ( name ) <EOL> } <EOL> return ret </s>
