- lib/api.rb
- lib/nebula.rb
-# Omit the parentheses in defs when the method doesn't accept any arguments
-# (easy to read)
-Style/DefWithParentheses:
- Enabled: false
-
# Extra empty line detected at class body end
# (easy to read)
Style/EmptyLinesAroundClassBody:
@ctx = @user_ctx
end
- def switch_server()
+ def switch_server
admin_user = @config['opennebula']['admin_user']
admin_password = @config['opennebula']['admin_password']
logger.debug "Authentication to #{admin_user}"
@ctx = @server_ctx
end
- def initialize()
+ def initialize
@logger = $logger
logger.info "Starting Network Orchestrator Wrapper (NOW #{VERSION})"
@config = {}
@url = @config['opennebula']['endpoint']
end
- def list_networks()
+ def list_networks
vn_pool = OpenNebula::VirtualNetworkPool.new(@ctx, -1)
check(vn_pool.info)