source/code/plugins/agent_maintenance_script.rb
# Update the DSC_ENDPOINT variable in omsadmin.conf from the server XML
Update the DSC_ENDPOINT variable in omsadmin.conf from the server XML
Update the DSC_ENDPOINT variable in omsadmin . conf from the server XML
def apply_dsc_endpoint(server_resp)
      dsc_endpoint = ""
      dsc_conf_regex = /<DscConfiguration.*<Endpoint>(?<endpoint>.*)<\/Endpoint>.*DscConfiguration>/
      dsc_conf_regex.match(server_resp) { |match|
        dsc_endpoint = match["endpoint"]
        dsc_endpoint = dsc_endpoint.gsub("(", "\\\\(").gsub(")", "\\\\)")
      }
      if dsc_endpoint.empty?
        log_error("Could not extract the DSC endpoint.")
        return ERROR_EXTRACTING_ATTRIBUTES
      end
      update_config("DSC_ENDPOINT", dsc_endpoint)
      return dsc_endpoint
    end
def apply_dsc_endpoint ( server_resp ) dsc_endpoint = "" dsc_conf_regex = / <DscConfiguration.*<Endpoint>(?<endpoint>.*)< \/ Endpoint>.*DscConfiguration> / dsc_conf_regex . match ( server_resp ) { | match | dsc_endpoint = match [ "endpoint" ] dsc_endpoint = dsc_endpoint . gsub ( "(" , "\\\\(" ) . gsub ( ")" , "\\\\)" ) } if dsc_endpoint . empty? log_error ( "Could not extract the DSC endpoint." ) return ERROR_EXTRACTING_ATTRIBUTES end update_config ( "DSC_ENDPOINT" , dsc_endpoint ) return dsc_endpoint end
Update the DSC_ENDPOINT variable in omsadmin.conf from the server XML
Update the DSC_ENDPOINT variable in omsadmin . conf from the server XML
# Extract the DSC endpoint from the server response # Insert escape characters before open and closed parentheses # Update omsadmin.conf with dsc_endpoint variable # When apply_dsc_endpoint is called from onboarding, dsc_endpoint will be returned in file
server_resp
<not_specific>