Class: Nexpose::ReportTemplateListing

Inherits:
Object
  • Object
show all
Defined in:
lib/nexpose.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



2408
2409
2410
# File 'lib/nexpose.rb', line 2408

def connection
  @connection
end

#errorObject (readonly)

Returns the value of attribute error.



2405
2406
2407
# File 'lib/nexpose.rb', line 2405

def error
  @error
end

#error_msgObject (readonly)

Returns the value of attribute error_msg.



2404
2405
2406
# File 'lib/nexpose.rb', line 2404

def error_msg
  @error_msg
end

#report_template_summariesObject (readonly)

; //Array (ReportTemplateSummary*)



2410
2411
2412
# File 'lib/nexpose.rb', line 2410

def report_template_summaries
  @report_template_summaries
end

#request_xmlObject (readonly)

Returns the value of attribute request_xml.



2406
2407
2408
# File 'lib/nexpose.rb', line 2406

def request_xml
  @request_xml
end

#response_xmlObject (readonly)

Returns the value of attribute response_xml.



2407
2408
2409
# File 'lib/nexpose.rb', line 2407

def response_xml
  @response_xml
end

#xml_tag_stackObject (readonly)

Returns the value of attribute xml_tag_stack.



2409
2410
2411
# File 'lib/nexpose.rb', line 2409

def xml_tag_stack
  @xml_tag_stack
end

Instance Method Details

#ReportTemplateListing(connection) ⇒ Object



2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
# File 'lib/nexpose.rb', line 2413

def ReportTemplateListing(connection)

	@error = nil
	@connection = connection
	@report_template_summaries = Array.new()

	r = @connection.execute('<ReportTemplateListingRequest session-id="' + connection.session_id.to_s + '"/>')
	if (r.success)
		r.res.elements.each('ReportTemplateListingResponse/ReportTemplateSummary') do |r|
			@report_template_summaries.push(ReportTemplateSumary.new(r.attributes['id'],r.attributes['name']))
		end
	else
		@error = true
		@error_msg = 'ReportTemplateListingRequest Parse Error'
	end

end