<s> from msrest . pipeline import ClientRawResponse <EOL> import uuid <EOL> from . . import models <EOL> class ComputeNodeOperations ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , client , config , serializer , deserializer ) : <EOL> self . _client = client <EOL> self . _serialize = serializer <EOL> self . _deserialize = deserializer <EOL> self . config = config <EOL> def add_user ( <EOL> self , pool_id , node_id , user , compute_node_add_user_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_add_user_options is not None : <EOL> timeout = compute_node_add_user_options . timeout <EOL> client_request_id = None <EOL> if compute_node_add_user_options is not None : <EOL> client_request_id = compute_node_add_user_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_add_user_options is not None : <EOL> return_client_request_id = compute_node_add_user_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_add_user_options is not None : <EOL> ocp_date = compute_node_add_user_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> body_content = self . _serialize . body ( user , '<STR_LIT>' ) <EOL> request = self . _client . post ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , body_content , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def delete_user ( <EOL> self , pool_id , node_id , user_name , compute_node_delete_user_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_delete_user_options is not None : <EOL> timeout = compute_node_delete_user_options . timeout <EOL> client_request_id = None <EOL> if compute_node_delete_user_options is not None : <EOL> client_request_id = compute_node_delete_user_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_delete_user_options is not None : <EOL> return_client_request_id = compute_node_delete_user_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_delete_user_options is not None : <EOL> ocp_date = compute_node_delete_user_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , user_name , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . delete ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def update_user ( <EOL> self , pool_id , node_id , user_name , node_update_user_parameter , compute_node_update_user_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_update_user_options is not None : <EOL> timeout = compute_node_update_user_options . timeout <EOL> client_request_id = None <EOL> if compute_node_update_user_options is not None : <EOL> client_request_id = compute_node_update_user_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_update_user_options is not None : <EOL> return_client_request_id = compute_node_update_user_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_update_user_options is not None : <EOL> ocp_date = compute_node_update_user_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , user_name , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> body_content = self . _serialize . body ( node_update_user_parameter , '<STR_LIT>' ) <EOL> request = self . _client . put ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , body_content , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def get ( <EOL> self , pool_id , node_id , compute_node_get_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> select = None <EOL> if compute_node_get_options is not None : <EOL> select = compute_node_get_options . select <EOL> timeout = None <EOL> if compute_node_get_options is not None : <EOL> timeout = compute_node_get_options . timeout <EOL> client_request_id = None <EOL> if compute_node_get_options is not None : <EOL> client_request_id = compute_node_get_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_get_options is not None : <EOL> return_client_request_id = compute_node_get_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_get_options is not None : <EOL> ocp_date = compute_node_get_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if select is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , select , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> deserialized = None <EOL> header_dict = { } <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _deserialize ( '<STR_LIT>' , response ) <EOL> header_dict = { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> client_raw_response . add_headers ( header_dict ) <EOL> return client_raw_response <EOL> return deserialized <EOL> def reboot ( <EOL> self , pool_id , node_id , compute_node_reboot_options = None , node_reboot_option = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_reboot_options is not None : <EOL> timeout = compute_node_reboot_options . timeout <EOL> client_request_id = None <EOL> if compute_node_reboot_options is not None : <EOL> client_request_id = compute_node_reboot_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_reboot_options is not None : <EOL> return_client_request_id = compute_node_reboot_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_reboot_options is not None : <EOL> ocp_date = compute_node_reboot_options . ocp_date <EOL> node_reboot_parameter = None <EOL> if node_reboot_option is not None : <EOL> node_reboot_parameter = models . NodeRebootParameter ( node_reboot_option = node_reboot_option ) <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> if node_reboot_parameter is not None : <EOL> body_content = self . _serialize . body ( node_reboot_parameter , '<STR_LIT>' ) <EOL> else : <EOL> body_content = None <EOL> request = self . _client . post ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , body_content , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def reimage ( <EOL> self , pool_id , node_id , compute_node_reimage_options = None , node_reimage_option = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_reimage_options is not None : <EOL> timeout = compute_node_reimage_options . timeout <EOL> client_request_id = None <EOL> if compute_node_reimage_options is not None : <EOL> client_request_id = compute_node_reimage_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_reimage_options is not None : <EOL> return_client_request_id = compute_node_reimage_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_reimage_options is not None : <EOL> ocp_date = compute_node_reimage_options . ocp_date <EOL> node_reimage_parameter = None <EOL> if node_reimage_option is not None : <EOL> node_reimage_parameter = models . NodeReimageParameter ( node_reimage_option = node_reimage_option ) <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> if node_reimage_parameter is not None : <EOL> body_content = self . _serialize . body ( node_reimage_parameter , '<STR_LIT>' ) <EOL> else : <EOL> body_content = None <EOL> request = self . _client . post ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , body_content , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def disable_scheduling ( <EOL> self , pool_id , node_id , compute_node_disable_scheduling_options = None , node_disable_scheduling_option = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_disable_scheduling_options is not None : <EOL> timeout = compute_node_disable_scheduling_options . timeout <EOL> client_request_id = None <EOL> if compute_node_disable_scheduling_options is not None : <EOL> client_request_id = compute_node_disable_scheduling_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_disable_scheduling_options is not None : <EOL> return_client_request_id = compute_node_disable_scheduling_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_disable_scheduling_options is not None : <EOL> ocp_date = compute_node_disable_scheduling_options . ocp_date <EOL> node_disable_scheduling_parameter = None <EOL> if node_disable_scheduling_option is not None : <EOL> node_disable_scheduling_parameter = models . NodeDisableSchedulingParameter ( node_disable_scheduling_option = node_disable_scheduling_option ) <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> if node_disable_scheduling_parameter is not None : <EOL> body_content = self . _serialize . body ( node_disable_scheduling_parameter , '<STR_LIT>' ) <EOL> else : <EOL> body_content = None <EOL> request = self . _client . post ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , body_content , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def enable_scheduling ( <EOL> self , pool_id , node_id , compute_node_enable_scheduling_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_enable_scheduling_options is not None : <EOL> timeout = compute_node_enable_scheduling_options . timeout <EOL> client_request_id = None <EOL> if compute_node_enable_scheduling_options is not None : <EOL> client_request_id = compute_node_enable_scheduling_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_enable_scheduling_options is not None : <EOL> return_client_request_id = compute_node_enable_scheduling_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_enable_scheduling_options is not None : <EOL> ocp_date = compute_node_enable_scheduling_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . post ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( None , response ) <EOL> client_raw_response . add_headers ( { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> } ) <EOL> return client_raw_response <EOL> def get_remote_login_settings ( <EOL> self , pool_id , node_id , compute_node_get_remote_login_settings_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_get_remote_login_settings_options is not None : <EOL> timeout = compute_node_get_remote_login_settings_options . timeout <EOL> client_request_id = None <EOL> if compute_node_get_remote_login_settings_options is not None : <EOL> client_request_id = compute_node_get_remote_login_settings_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_get_remote_login_settings_options is not None : <EOL> return_client_request_id = compute_node_get_remote_login_settings_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_get_remote_login_settings_options is not None : <EOL> ocp_date = compute_node_get_remote_login_settings_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> deserialized = None <EOL> header_dict = { } <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _deserialize ( '<STR_LIT>' , response ) <EOL> header_dict = { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> client_raw_response . add_headers ( header_dict ) <EOL> return client_raw_response <EOL> return deserialized <EOL> def get_remote_desktop ( <EOL> self , pool_id , node_id , compute_node_get_remote_desktop_options = None , custom_headers = { } , raw = False , callback = None , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> timeout = None <EOL> if compute_node_get_remote_desktop_options is not None : <EOL> timeout = compute_node_get_remote_desktop_options . timeout <EOL> client_request_id = None <EOL> if compute_node_get_remote_desktop_options is not None : <EOL> client_request_id = compute_node_get_remote_desktop_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_get_remote_desktop_options is not None : <EOL> return_client_request_id = compute_node_get_remote_desktop_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_get_remote_desktop_options is not None : <EOL> ocp_date = compute_node_get_remote_desktop_options . ocp_date <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) , <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , node_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> deserialized = None <EOL> header_dict = { } <EOL> if response . status_code == <NUM_LIT:200> : <EOL> deserialized = self . _client . stream_download ( response , callback ) <EOL> header_dict = { <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT:str>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> if raw : <EOL> client_raw_response = ClientRawResponse ( deserialized , response ) <EOL> client_raw_response . add_headers ( header_dict ) <EOL> return client_raw_response <EOL> return deserialized <EOL> def list ( <EOL> self , pool_id , compute_node_list_options = None , custom_headers = { } , raw = False , ** operation_config ) : <EOL> """<STR_LIT>""" <EOL> filter = None <EOL> if compute_node_list_options is not None : <EOL> filter = compute_node_list_options . filter <EOL> select = None <EOL> if compute_node_list_options is not None : <EOL> select = compute_node_list_options . select <EOL> max_results = None <EOL> if compute_node_list_options is not None : <EOL> max_results = compute_node_list_options . max_results <EOL> timeout = None <EOL> if compute_node_list_options is not None : <EOL> timeout = compute_node_list_options . timeout <EOL> client_request_id = None <EOL> if compute_node_list_options is not None : <EOL> client_request_id = compute_node_list_options . client_request_id <EOL> return_client_request_id = None <EOL> if compute_node_list_options is not None : <EOL> return_client_request_id = compute_node_list_options . return_client_request_id <EOL> ocp_date = None <EOL> if compute_node_list_options is not None : <EOL> ocp_date = compute_node_list_options . ocp_date <EOL> def internal_paging ( next_link = None , raw = False ) : <EOL> if not next_link : <EOL> url = '<STR_LIT>' <EOL> path_format_arguments = { <EOL> '<STR_LIT>' : self . _serialize . url ( "<STR_LIT>" , pool_id , '<STR_LIT:str>' ) <EOL> } <EOL> url = self . _client . format_url ( url , ** path_format_arguments ) <EOL> query_parameters = { } <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , self . config . api_version , '<STR_LIT:str>' ) <EOL> if filter is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , filter , '<STR_LIT:str>' ) <EOL> if select is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , select , '<STR_LIT:str>' ) <EOL> if max_results is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , max_results , '<STR_LIT:int>' ) <EOL> if timeout is not None : <EOL> query_parameters [ '<STR_LIT>' ] = self . _serialize . query ( "<STR_LIT>" , timeout , '<STR_LIT:int>' ) <EOL> else : <EOL> url = next_link <EOL> query_parameters = { } <EOL> header_parameters = { } <EOL> header_parameters [ '<STR_LIT:Content-Type>' ] = '<STR_LIT>' <EOL> if self . config . generate_client_request_id : <EOL> header_parameters [ '<STR_LIT>' ] = str ( uuid . uuid1 ( ) ) <EOL> if custom_headers : <EOL> header_parameters . update ( custom_headers ) <EOL> if self . config . accept_language is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , self . config . accept_language , '<STR_LIT:str>' ) <EOL> if client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , client_request_id , '<STR_LIT:str>' ) <EOL> if return_client_request_id is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , return_client_request_id , '<STR_LIT:bool>' ) <EOL> if ocp_date is not None : <EOL> header_parameters [ '<STR_LIT>' ] = self . _serialize . header ( "<STR_LIT>" , ocp_date , '<STR_LIT>' ) <EOL> request = self . _client . get ( url , query_parameters ) <EOL> response = self . _client . send ( <EOL> request , header_parameters , ** operation_config ) <EOL> if response . status_code not in [ <NUM_LIT:200> ] : <EOL> raise models . BatchErrorException ( self . _deserialize , response ) <EOL> return response <EOL> deserialized = models . ComputeNodePaged ( internal_paging , self . _deserialize . dependencies ) <EOL> if raw : <EOL> header_dict = { } <EOL> client_raw_response = models . ComputeNodePaged ( internal_paging , self . _deserialize . dependencies , header_dict ) <EOL> return client_raw_response <EOL> return deserialized </s>
