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.



2630
2631
2632
# File 'lib/nexpose.rb', line 2630

def connection
  @connection
end

#errorObject (readonly)

Returns the value of attribute error.



2627
2628
2629
# File 'lib/nexpose.rb', line 2627

def error
  @error
end

#error_msgObject (readonly)

Returns the value of attribute error_msg.



2626
2627
2628
# File 'lib/nexpose.rb', line 2626

def error_msg
  @error_msg
end

#report_template_summariesObject (readonly)

; //Array (ReportTemplateSummary*)



2632
2633
2634
# File 'lib/nexpose.rb', line 2632

def report_template_summaries
  @report_template_summaries
end

#request_xmlObject (readonly)

Returns the value of attribute request_xml.



2628
2629
2630
# File 'lib/nexpose.rb', line 2628

def request_xml
  @request_xml
end

#response_xmlObject (readonly)

Returns the value of attribute response_xml.



2629
2630
2631
# File 'lib/nexpose.rb', line 2629

def response_xml
  @response_xml
end

#xml_tag_stackObject (readonly)

Returns the value of attribute xml_tag_stack.



2631
2632
2633
# File 'lib/nexpose.rb', line 2631

def xml_tag_stack
  @xml_tag_stack
end

Instance Method Details

#ReportTemplateListing(connection) ⇒ Object



2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
# File 'lib/nexpose.rb', line 2635

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