vcenter_lib_mongodb 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vcenter_lib_mongodb/mongodb.rb +1 -1
- data/lib/vcenter_lib_mongodb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e774294e886d7f4789ed55d20b160396b107b708
|
|
4
|
+
data.tar.gz: 3c51c342f2e7ed321bb72f1f0053ad575df7135c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1741d6309d001ffc6089ae34e07410ab5b1c82a6b49a6944acda81de6c3f27d5161cb9d8e5a55c65c05b97dbef44757ed373996bf8d46e8b787f2624123a21db
|
|
7
|
+
data.tar.gz: 309148795350798c58d634c460362994ff5e08624a616a88e564caed79cb336119e8acc5caf3411d989105fa591724d9e620d5761ef5e1af2df2e9fffee15fd9
|
|
@@ -36,7 +36,7 @@ module VcenterLibMongodb
|
|
|
36
36
|
# nil or white space only string will return all VMs
|
|
37
37
|
# @return [Array<String>] names of nodes that fulfill the query
|
|
38
38
|
def query_vms(query)
|
|
39
|
-
return all_nodes if
|
|
39
|
+
return all_nodes if query.nil? || query.strip.empty?
|
|
40
40
|
mongo_query = convert.query(query)
|
|
41
41
|
collection = connection[vms_collection]
|
|
42
42
|
collection.find(mongo_query).batch_size(999).projection(_id: 1).map { |k| k[:_id] }
|