<s> from kmip . core . enums import Operation <EOL> from kmip . core . enums import ResultStatus <EOL> from kmip . core . enums import RevocationReasonCode <EOL> from kmip . demos import utils <EOL> from kmip . services . kmip_client import KMIPProxy <EOL> import logging <EOL> import sys <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> logger = utils . build_console_logger ( logging . INFO ) <EOL> parser = utils . build_cli_parser ( Operation . REVOKE ) <EOL> opts , args = parser . parse_args ( sys . argv [ <NUM_LIT:1> : ] ) <EOL> config = opts . config <EOL> uuid = opts . uuid <EOL> if uuid is None : <EOL> logger . error ( '<STR_LIT>' ) <EOL> sys . exit ( ) <EOL> client = KMIPProxy ( config = config ) <EOL> client . open ( ) <EOL> result = client . revoke ( <EOL> uuid , <EOL> RevocationReasonCode . UNSPECIFIED , <EOL> '<STR_LIT>' ) <EOL> client . close ( ) <EOL> logger . info ( '<STR_LIT>' . format ( <EOL> result . result_status . value ) ) <EOL> if result . result_status . value == ResultStatus . SUCCESS : <EOL> logger . info ( '<STR_LIT>' . format ( result . unique_identifier . value ) ) <EOL> else : <EOL> logger . info ( '<STR_LIT>' . format ( <EOL> result . result_reason . value ) ) <EOL> logger . info ( '<STR_LIT>' . format ( <EOL> result . result_message . value ) ) </s>
