Class: CloudpiRuntime::MongoClient
- Inherits:
-
Object
- Object
- CloudpiRuntime::MongoClient
- Includes:
- CloudpiRuntime
- Defined in:
- lib/client/MongoClient.rb,
lib/client/MongoClient.rb
Instance Method Summary collapse
Methods included from CloudpiRuntime
Instance Method Details
#create_from_svc(hostname) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/client/MongoClient.rb', line 15 def create_from_svc(hostname) m = credential_map("mongo") c = m[hostname]; p c db = Mongo::Connection.new(c.host,c.port).db(c.db) auth = db.authenticate(c.username,c.password) return db end |