Module: NexposeSecurityConsole
- Included in:
- Group
- Defined in:
- lib/nexpose-security-console.rb,
lib/nexpose-security-console/group.rb,
lib/nexpose-security-console/version.rb,
lib/nexpose-security-console/connection.rb
Overview
Add requires for other files you add to your project here, so you just need to require this one file in your bin file
Defined Under Namespace
Modules: Group
Constant Summary collapse
- VERSION =
'0.0.6'
Class Method Summary collapse
- .connection(username, password, server, port) ⇒ Object
- .credentials ⇒ Object
-
.login ⇒ Object
login with credential values stored in the ENV variables.
Class Method Details
.connection(username, password, server, port) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/nexpose-security-console.rb', line 9 def self.connection(username, password, server, port) Dotenv.load nsc = Nexpose::Connection.new(server, username, password, port) # nsc.login nsc end |
.credentials ⇒ Object
16 17 |
# File 'lib/nexpose-security-console.rb', line 16 def self.credentials end |
.login ⇒ Object
login with credential values stored in the ENV variables
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/nexpose-security-console.rb', line 20 def self.login Dotenv.load server = ENV['NEXPOSE_HOST'] username = ENV['NEXPOSE_USER'] password = ENV['NEXPOSE_PASSWORD'] port = ENV['NEXPOSE_PORT'] nsc = Nexpose::Connection.new(server, username, password, port) # nsc.login nsc end |