Skip to content

Latest commit

 

History

History
401 lines (365 loc) · 15.1 KB

community.missing_collection.orientdb_db_info_module.rst

File metadata and controls

401 lines (365 loc) · 15.1 KB

community.missing_collection.orientdb_db_info

Get information from OrientDB Database.

Version added: 0.2.0

The below requirements are needed on the host that executes this module.

  • pyorient
Parameter Choices/Defaults Comments
check_default_credentials
boolean
    Choices:
  • no
  • yes
do you want to check if any database is enabled with default credentials?
database
string
name of the database.
db_count_records
boolean
    Choices:
  • no
  • yes
do you want to fetch number of records from database?
db_exists
boolean
    Choices:
  • no
  • yes
do you want to check existence of database?
db_list
boolean
    Choices:
  • no
  • yes
do you want to fetch names of all the databases?
db_size
boolean
    Choices:
  • no
  • yes
do you want to fetch size of database?
host
string / required
hostname of orientdb.
password
string
Default:
"root"
password for orientdb user.
port
integer
Default:
2424
port number of orientdb.
storage_type
string
    Choices:
  • plocal
  • memory
storage type of the database.
user
string
Default:
"root"
orientdb username.

- name: list all orientdb databases
  community.missing_collection.orientdb_db_info:
    host: 'localhost'
    port: 2424
    user: 'root'
    password: 'root'
    db_list: true

- name: get database size in orientdb
  community.missing_collection.orientdb_db_info:
    host: 'localhost'
    port: 2424
    user: 'root'
    password: 'root'
    db_size: 'true'
    database: 'test2'

- name: check database existence in orientdb
  community.missing_collection.orientdb_db_info:
    host: 'localhost'
    port: 2424
    user: 'root'
    password: 'root'
    db_exists: true
    database: 'test2'
    type: 'plocal'

- name: get total number of records in orientdb database
  community.missing_collection.orientdb_db_info:
    host: 'localhost'
    port: 2424
    user: 'root'
    password: 'root'
    db_count_records: true
    database: 'test2'

- name: get list of database with default credentials
  community.missing_collection.orientdb_db_info:
    host: 'localhost'
    port: 2424
    user: 'root'
    password: 'root'
    check_default_credentials: true

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
count
integer
when db_count_records is defined and success.
get number of records in database.

Sample:
9
databases
dictionary
when db_list is defined and success.
name of all the databases.

Sample:
{'test1': 'plocal:/orientdb/databases/test1', 'test2': 'memory:test2'}
default_credential_dbs
list
when check_default_credentials is defined and success.
check if any database exists with default credentials.

Sample:
['test2']
exist
boolean
when db_exists is defined and success.
check database existence.

Sample:
True
size
integer
when db_size is defined and success.
size of the database.

Sample:
12311


Authors