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.



2759
2760
2761
# File 'lib/nexpose.rb', line 2759

def connection
  @connection
end

#errorObject (readonly)

Returns the value of attribute error.



2756
2757
2758
# File 'lib/nexpose.rb', line 2756

def error
  @error
end

#error_msgObject (readonly)

Returns the value of attribute error_msg.



2755
2756
2757
# File 'lib/nexpose.rb', line 2755

def error_msg
  @error_msg
end

#report_template_summariesObject (readonly)

; //Array (ReportTemplateSummary*)



2761
2762
2763
# File 'lib/nexpose.rb', line 2761

def report_template_summaries
  @report_template_summaries
end

#request_xmlObject (readonly)

Returns the value of attribute request_xml.



2757
2758
2759
# File 'lib/nexpose.rb', line 2757

def request_xml
  @request_xml
end

#response_xmlObject (readonly)

Returns the value of attribute response_xml.



2758
2759
2760
# File 'lib/nexpose.rb', line 2758

def response_xml
  @response_xml
end

#xml_tag_stackObject (readonly)

Returns the value of attribute xml_tag_stack.



2760
2761
2762
# File 'lib/nexpose.rb', line 2760

def xml_tag_stack
  @xml_tag_stack
end

Instance Method Details

#ReportTemplateListing(connection) ⇒ Object



2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
# File 'lib/nexpose.rb', line 2764

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