Name | ecscmdb JSON |
Version |
2.0.5
JSON |
| download |
home_page | |
Summary | Dump the OpenManage database. |
upload_time | 2023-12-21 19:49:37 |
maintainer | Thomas R. Stevenson |
docs_url | None |
author | Thomas R. Stevenson |
requires_python | >=3.11,<4.0 |
license | GPL-3.0-or-later |
keywords |
cmdb
cmdbdiff
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# ECScmdb
# CLI Version
cmdb: ecscmdb(1.7.2), ecspylibs(1.1.27)
cmdbdiff: ecscmdb(1.7.2), ecspylibs(1.1.27)
# Summary of commands
cmdb: Download the devices in the OpenManage database into a
spreadsheet, one work sheet for each device.
cmdbdiff: Compare two cmdb spreadsheets for differences.
# Assumptions
The ecscmdb user needs to know:
* how to run commands in a Linux environment.
* how to install python packages in a virtualenv.
* how to run python commands in a virtualenv.
* how to configure yaml files.
* some basic understanding of jinja2 variable used in the yaml file.
# Installation
It is best to create a dedicated python virtualenv to install
ecscmdb into so as not to interfere with any other python packages
installed on your system.
# virtualenv .venv
# . .venv/bin/activate
# pip install ecscmdb
# Setup
## cmdb
Before cmdb can be used to gather OpenManage data, two config
files and one password files must be created. They are both
located in the directory etc/ecscmdb, which is relative to the
virtualenv directory ecscmdb was installed in. The config files
can be in yaml, toml, or json formats. Only yaml format will be
used in this documentation. The two config files are cmdb.yml and
filter.yml.
### cmdb.yml
cmdb.yml is a yaml file. The yaml file can have multiple "config"
sections defined within it. There must be at lease one config section.
Each config secion has the following fields:
name: The name of the config section.
pw: The location of the cmdb password file relative to
virtualenv base directory cmdb was installed in.
log_level: The python log level cmdb will run at. Must be one of
DEBUG, INFO, WARNING, ERROR, CRITICAL, or TRACE.
log_dir: The location of the cmdb log directory relative to
virtualenv base directory cmdb was installed in.
OME_Login: The User ID of the OpenManage server that will be used
to gather the data.
poolsize: The number of python ProcessPoolExecutor pools that will
be used to gather the OpenManage data.
filter: The location of the cmdb filter file. The filter
file, explained in detail below, scans the incoming
OpenManage, and only stores the required columns and
rows of the data.
output: The location of the cmdb output file that the cmdb
spreadsheet will be written to. The name of the file can
include the jinja2 variable "{{ TOD }}" to include the
current date and time.
In addition to the config section(s), the yaml file also must include
the yaml variable "section:" which indicates which of the config sections
to process.
### cmdb.yml example file
```
Here is an example cmdb.yml file with two config sections. Because the
"section:" variable is set to 2 in this example the second section, with
name "Configuration file Testing", will be used.
---
section: 2
config:
- name: Configuration file Production.
pw: etc/ecscmdb/cmdb.pw
log_level: warning
log_dir: log
OME_Login: cmdb
poolsize: 12
filter: etc/ecscmdb/filter.yml
output: output/OpenManage-cmdb.{{ TOD }}.xlsx
- name: Configuration file Testing.
pw: etc/ecscmdb/cmdb.pw
log_level: TRACE
log_dir: log
OME_Login: cmdb
poolsize: 24
filter: etc/ecscmdb/filter.yml
output: output/OpenManage-test-cmdb.{{ TOD }}.xlsx
...
```
### filter.yml
filter.yml is a yaml file. The yaml file can have multiple "config"
sections defined within it. There must be at lease one config section.
Each config secion has the following fields:
name: The name of the config section.
column_header: The name of the column used to match the "row" labels.
rename_columns: A dictionary of "Old Name": "New Name" used to rename
Column lines.
sort_columns: A list of column names to sort the each worksheet with.
filters: A list of Row:Columns:Update to include from the
OpenManage database into each created worksheet. The
Update option is optional.
Row: The names of the row to look for matching columns in
within the OpenManage database data.
Columns: A list of matching Columns names for the given Row to
include.
Update: A dictional entry of "Column Name": "Function Name".
If the Column Name is part of the data precented from
the OpenManage database, then the cell for Row:Column
will be modified using the Function Name provided.
The Function is defined in the python library
updatecells.py that is part of the ECScmdb packages.
This should be the only python library that needs to
be modified.
In addition to the config section(s), the yaml file also must
include the yaml variable "section:" which indicates which of the
config sections to process.
### filter.yml example file
```
Here is an example filter.yml file with one config section. Because the
"section:" variable is set to 1 in this example the first section, with
name "Partial", will be used.
---
section: 1
config:
- name: Partial
column_header: InventoryType
rename_columns:
Ports: "Mac Address"
sort_columns:
- InventoryType
- DeviceDescription
- DeviceName
- InstanceId
- NicId
- CapabilityType.CapabilityId
- CapabilityType.Description
- CapabilityType.IdOwner
- CapabilityType.Name
- DiskNumber
- DnsName
- EndDate
- EntitlementId
- Id
- IdOwner
- LicenseDescription
- LicenseType.LicenseId
- LicenseType.Name
- Name
- Number
- SasAddress
- SerialNumber
- ServiceTag
- SlotNumber
- SoldDate
filters:
-
row: serverProcessors
columns:
- InstanceId
- InventoryType
- ModelName
- NumberOfCores
-
row: serverFcCards
columns:
- DeviceDescription
- DeviceName
- InventoryType
- VirtualWwn
- VirtualWwpn
- Wwn
- Wwpn
-
row: serverOperatingSystems
columns:
- Hostname
- InventoryType
- OsName
-
row: serverArrayDisks
columns:
- BusType
- DiskNumber
- InventoryType
- MediaType
- ModelNumber
- SerialNumber
- Size
-
row: serverMemoryDevices
columns:
- DeviceDescription
- InstanceId
- InventoryType
- ManufacturerDate
- Name
- SerialNumber
- Size
- Speed
- TypeDetails
-
row: serverNetworkInterfaces
columns:
- InventoryType
- NicId
- Ports
update:
Ports: update_ports
-
row: chassisSlotsList
columns:
- DnsName
- InventoryType
- Model
- Name
- Number
- Occupied
- ServiceTag
-
row: chassisControllerList
columns:
- InventoryType
- Name
-
row: deviceManagement
columns:
- DnsName
- EndPointAgents
- InstrumentationName
- InventoryType
- IpAddress
- MacAddress
- ManagementId
- ManagementType.Description
- ManagementType.Name
update:
EndPointAgents: update_end_point_agents
-
row: nicInformation
columns:
- Description
- DeviceId
- InventoryType
- Ipv4_address
- Mac_address
- Subnet_mask
...
```
### cmdb.pw
cmdb.pw is a python AES encripted password file. It must contain the
following two entries:
1. A key that matches the OME_Login variable from the cmdb.yml
file. The value of the entry is the password for that user.
2. A key named "OMEHost" (case-sensitive string). The value of
the entry is the URL for the OpenManage host.
### Adding or updating an entry in the cmdb.pw file
Execute "cmdb --add=STRING", where STRING is the key to be created
or updated. cmdb will then prompt for the value for the given
key. The entries are encripted and stored in the cmdb.pw file.
### Example
# cmdb --add=xyzzy
Enter password for user 'xyzzy':
#
### Deleting an entry from the cmdb.pw file
Execute "cmdb --delete=STRING", where STRING is the key to be
deleted. The entries will be deleted without prompting.
### Example
# cmdb --delete=xyzzy
#
### List the keys or keys/values stored n the cmdb.pw file
Execute "cmdb --list" to list all of the keys in the cmdb.pw file,
or "cmdb --list --verbose" to list both the keys and the values
for each key.
### Examples
# cmdb --list
# cmdb --list --verbose
## cmdbdiff
Before cmdbdiff can be used to compare two OpenManage
spreadsheets, created using the cmdb command, the file
cmdbdiff.yml must be created. This file is located in the
directory etc/ecscmdb, which is relative to the virtualenv
directory ecscmdb was installed in.
### cmdbdiff.yml
cmdbdiff.yml is a yaml file. The yaml file can have multiple
"config" sections defined within it. There must be at least one
config section in it. In addition to the config section(s), the
yaml file also must include the yaml variable "section:" which
indicates which of the config sections to process.st be at lease
one config section. Each config secion has the following fields:
name: The name of the configuration section
(optional).
admin: The Admin managing cmdbdiff.
name: The Admin name.
email: The Admin email address.
phone: The Admin phone number.
log_level: The python log level cmdb will run at.
Must be one of DEBUG, INFO, WARNING, ERROR,
CRITICAL, or TRACE.
log_dir: The location of the cmdb log directory
relative to virtualenv base directory cmdb
was installed in.
report: The location of the cmdbdiff report file
that cmdbdiff writes to. The name of the
file can include the jinja2 variable
"{{ TOD }}" to include the current date and
time.
email: The email section indicates who should
receive a copy of the cmdbdiff report.
subject: The subject line of the report email.
from: The name and email address of the user
sending the report.
name: The sending name.
email: The sending email address.
to: A list of zero or more "to" email addresses.
name: The outgoing name.
email: The outgoing email address.
cc: A list of zero or more "cc" email addresses.
name: The outgoing name.
email: The outgoing email address.
text: The text of the email that is sent.
with_changes: The text of the email being if there are
changes between the spreadsheets being
checked.
without_changes: The text of the email being if there are no
changes between the spreadsheets being
checked.
In addition to the config section(s), the yaml file also must include
the yaml variable "section:" which indicates which of the config sections
to process.
### jinja2 variables used in the cmdbdiff.yml file
```
There are several jinja2 variables that can be used in the cmdbdiff.yml
configuration file. Here is a list with a description of their values:
TOD: The current Date and Time.
DATE: The currect Date.
TIME: The current Time.
HOST: The Host name the report was generated on.
VERSION: The Version of the cmdbdiff program.
SPREADSHEET1: The name of the first spreadsheet being checked.
WORKSHEETS1: The number of Worksheets in the spreadsheet 1.
SPREADSHEET2: The name of the second spreadsheet being checked.
WORKSHEETS2: The number of Worksheets in the spreadsheet 2.
REPORT: The name of the report file (from config.report).
ADMINNAME: The name of the cmdbdiff Admin (from config.admin.name).
ADMINEMAIL: The email address of the cmdbdiff Admin (from
config.admin.email).
ADMINPHONE: The phone number of the cmdbdiff Admin (from
config.admin.phone).
```
### cmdbdiff.yml example file
```
Here is an example cmdb.yml file with one config sections. The "section:"
variable is set to 1 in this example the second section, with name
"Configuration file Production", will be used.
---
section: 1
config:
- name: Configuration file Production.
admin:
name: Bill Jones
email: BJ@example.com
phone: 999.555.1234
log_level: warning
log_dir: log
report: report/OpenManage-cmdbdiff-{{ TOD }}.xlsx
email:
subject: CMDB Diff Report generated on {{ DATE }} at {{ TIME }} on server {{ HOST }}.
from:
name: CMDB Diff Report
email: CMDB-Diff-Report@{{ HOST }}
to:
-
name: John Smith
email: JS@example.com
-
name: Steve Thomas
email: ST@example.com
cc:
-
name: Tim George
email: TG@example.com
text:
with_changes:
"\nCMDB Diff report, Version {{ VERSION }}, generated on {{ DATE
}} at {{ TIME }} on server {{ HOST }}.\n
There are three attached spreadsheets in this report:\n
1) {{ SPREADSHEET1 }}, is the previous CMDB spreadsheet with
{{ WORKSHEETS1 }} worksheets.\n
2) {{ SPREADSHEET2 }}, is an currect CMDB spreadsheet with {{
WORKSHEETS2 }} worksheets.\n
3) {{ REPORT }}, lists the changes between {{ SPREADSHEET1 }}
and {{ SPREADSHEET2 }}.\n
The first worksheet in {{ REPORT }} lists a summary of all
changes. The remaining worksheets in {{ REPORT }}, if any, are
copies of the worksheets in {{ SPREADSHEET2 }} that are
different from {{ SPREADSHEET1 }}.\n
Contact {{ ADMINNAME }} at email address {{ ADMINEMAIL }} or
phone number {{ ADMINPHONE }} if you have questions or
concerns regarding any of the spreadsheets generated in this
report.\n
Thanks!\n"
without_changes:
"\nCMDB Diff report, Version {{ VERSION }}, generated on {{ DATE
}} at {{ TIME }} on server {{ HOST }}.\n
The CMDB Diff report found no changes between {{
SPREADSHEET1 }} and {{ SPREADSHEET1 }} on {{ DATE }}.\n
There are three attached spreadsheets in this report:\n
1) {{ SPREADSHEET1 }}, is the previous CMDB spreadsheet with
{{ WORKSHEETS1 }} worksheets.\n
2) {{ SPREADSHEET2 }}, is an currect CMDB spreadsheet with {{
WORKSHEETS2 }} worksheets.\n
3) {{ REPORT }}, lists the changes between {{ SPREADSHEET1 }}
and {{ SPREADSHEET2 }}.\n
Contact {{ ADMINNAME }} at email address {{ ADMINEMAIL }} or
phone number {{ ADMINPHONE }} if you have questions or
concerns regarding any of the spreadsheets generated in this
report.\n
Thanks!\n"
```
# CLI Help text
## # cmdb --help
Program to download the data from the OpenManage DB and build a spreadsheet.
Some default option values listed below can be overridden within the
configuration file.
Usage:
cmdb [-v] [-L LEVEL] [--LOG=DIR] [-F] [-c CONFIG] [-s SECTION] [-o OUTPUT] [-p PWFILE] [-D] [-P SIZE]
cmdb [-vl] [-L LEVEL] [--LOG=DIR] [-c CONFIG] [-s SECTION] [-a ID]... [-d ID]... [-p PWFILE] [-D]
cmdb (-h | --help | -V | --version)
There are no required options.
Options:
-h, --help Show this help message and exit.
-V, --version Show version information and exit.
-F, --full Show all data, no filtering.
-c CONFIG, --config=CONFIG The configuration file.
Default: "/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdb.yml"
-s SECTION, --section=SECTION The configuration file version (default
defined within the configuration file).
-o OUTPUT, --output=OUTPUT Output file or directory.
Default: "/home/tom/Run/ECScmdb/Testing/output/OpenManage-cmdb.2023-02-08-18-14-30.xlsx"
-p PWFILE, --pw=PWFILE The password file. This file is used when a
login to a website or webpage is required.
Default: "/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdb.pw"
-l, --list List all of the IDs in the password file and
exit. If both the --list and --verbose
options are included, list both IDs and
Passwords and exit.
-a ID, --add=ID Add (or update) an ID and Password and exit.
Program will prompt for the Password to be
saved to the password file.
-d ID, --delete=ID Delete an ID (if it exists) from the
password file and exit.
-v, --verbose Print verbose messages.
-L LEVEL, --log=LEVEL Print log messages at log value LEVEL.
Valid levels are: TRACE, DEBUG, INFO, WARNING,
ERROR, and CRITICAL.
Default: WARNING
--LOG=DIR Log directory.
Default: "/home/tom/Run/ECScmdb/Testing/log/cmdb.log"
-D, --dryrun Only print out what would be done.
-P SIZE, --poolsize=SIZE Call OpenManage using pools of size SIZE.
Default: set by the OS.
## # cmdbdiff --help
Program to analyze two spreadsheets for differences.
Some default option values listed below can be overridden within the initialization file.
Usage:
cmdbdiff [-v] [-L LEVEL] [--LOG=DIR] [-c CONFIG] [-s SECTION] [-r REPORT] [-D] SPREADSHEET1 SPREADSHEET2
cmdbdiff (-h | --help | -V | --version)
Variables SPREADSHEET1 and SPREADSHEET2 are required, all other parameters are optional.
Options:
-h, --help Show this help message and exit.
-V, --version Show version information and exit.
-c CONFIG, --config=CONFIG The configuration file.
Default: "/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdbdiff.yml"
-s SECTION, --section=SECTION The configuration file version (default
defined within the configuration file).
-r REPORT, --report=REPORT Report directory or file.
-v, --verbose Print verbose messages.
-L LEVEL, --log=LEVEL Print log messages at log value LEVEL.
Valid levels are: TRACE, DEBUG, INFO, WARNING,
ERROR, and CRITICAL.
Default: "WARNING"
--LOG=DIR Log Directory,
Default: "/home/tom/Run/ECScmdb/Testing/log/cmdbdiff.log"
-D, --dryrun Only print out what would be done.
# Git information
[GIT Home][CMDB],
[README File][README],
[LICENSE File][LICENSE],
[ChangeLog File][CHANGELOG],
[pyproject.toml File][PYPROJECT].
# About me
[My contact information][About Me].
[CMDB]: https://git.wayne.edu/ECS_Projects/ECScmdb
[README]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/README.md
[LICENSE]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/LICENSE.txt
[CHANGELOG]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/ChangeLog
[PYPROJECT]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/pyproject.toml
[About Me]: https://About.Me/Thomas.R.Stevenson
Raw data
{
"_id": null,
"home_page": "",
"name": "ecscmdb",
"maintainer": "Thomas R. Stevenson",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "aa0026@wayne.edu",
"keywords": "cmdb,cmdbdiff",
"author": "Thomas R. Stevenson",
"author_email": "aa0026@wayne.edu",
"download_url": "https://files.pythonhosted.org/packages/ae/69/38858de49db4a42b5ab8239e43d35c8b966ddea7cab82fb5ceca89877bcf/ecscmdb-2.0.5.tar.gz",
"platform": null,
"description": "# ECScmdb\n\n# CLI Version\n\n cmdb: ecscmdb(1.7.2), ecspylibs(1.1.27)\n cmdbdiff: ecscmdb(1.7.2), ecspylibs(1.1.27)\n\n# Summary of commands\n\n cmdb: Download the devices in the OpenManage database into a\n spreadsheet, one work sheet for each device.\n\n cmdbdiff: Compare two cmdb spreadsheets for differences.\n\n# Assumptions\n\nThe ecscmdb user needs to know:\n\n* how to run commands in a Linux environment.\n* how to install python packages in a virtualenv.\n* how to run python commands in a virtualenv.\n* how to configure yaml files.\n* some basic understanding of jinja2 variable used in the yaml file.\n\n# Installation\n\n It is best to create a dedicated python virtualenv to install\n ecscmdb into so as not to interfere with any other python packages\n installed on your system.\n\n # virtualenv .venv\n # . .venv/bin/activate\n # pip install ecscmdb\n\n# Setup\n\n## cmdb\n\n Before cmdb can be used to gather OpenManage data, two config\n files and one password files must be created. They are both\n located in the directory etc/ecscmdb, which is relative to the\n virtualenv directory ecscmdb was installed in. The config files\n can be in yaml, toml, or json formats. Only yaml format will be\n used in this documentation. The two config files are cmdb.yml and\n filter.yml.\n\n### cmdb.yml\n\n cmdb.yml is a yaml file. The yaml file can have multiple \"config\" \n sections defined within it. There must be at lease one config section.\n Each config secion has the following fields:\n \n name: The name of the config section.\n\n pw: The location of the cmdb password file relative to \n virtualenv base directory cmdb was installed in.\n\n log_level: The python log level cmdb will run at. Must be one of \n DEBUG, INFO, WARNING, ERROR, CRITICAL, or TRACE.\n\n log_dir: The location of the cmdb log directory relative to \n virtualenv base directory cmdb was installed in. \n\n OME_Login: The User ID of the OpenManage server that will be used \n to gather the data.\n\n poolsize: The number of python ProcessPoolExecutor pools that will\n be used to gather the OpenManage data.\n\n filter: The location of the cmdb filter file. The filter\n file, explained in detail below, scans the incoming\n OpenManage, and only stores the required columns and\n rows of the data. \n \n output: The location of the cmdb output file that the cmdb \n spreadsheet will be written to. The name of the file can\n include the jinja2 variable \"{{ TOD }}\" to include the \n current date and time.\n\n In addition to the config section(s), the yaml file also must include \n the yaml variable \"section:\" which indicates which of the config sections\n to process.\n\n### cmdb.yml example file\n```\nHere is an example cmdb.yml file with two config sections. Because the\n\"section:\" variable is set to 2 in this example the second section, with \nname \"Configuration file Testing\", will be used.\n\n---\nsection: 2\nconfig:\n - name: Configuration file Production.\n pw: etc/ecscmdb/cmdb.pw\n log_level: warning\n log_dir: log\n OME_Login: cmdb\n poolsize: 12\n filter: etc/ecscmdb/filter.yml\n output: output/OpenManage-cmdb.{{ TOD }}.xlsx\n - name: Configuration file Testing.\n pw: etc/ecscmdb/cmdb.pw\n log_level: TRACE\n log_dir: log\n OME_Login: cmdb\n poolsize: 24\n filter: etc/ecscmdb/filter.yml\n output: output/OpenManage-test-cmdb.{{ TOD }}.xlsx\n...\n```\n\n### filter.yml\n\n filter.yml is a yaml file. The yaml file can have multiple \"config\" \n sections defined within it. There must be at lease one config section.\n Each config secion has the following fields:\n \n name: The name of the config section.\n \n column_header: The name of the column used to match the \"row\" labels.\n \n rename_columns: A dictionary of \"Old Name\": \"New Name\" used to rename\n Column lines.\n \n sort_columns: A list of column names to sort the each worksheet with.\n \n filters: A list of Row:Columns:Update to include from the \n OpenManage database into each created worksheet. The\n Update option is optional.\n\t\n Row: The names of the row to look for matching columns in\n within the OpenManage database data.\n\t\n Columns: A list of matching Columns names for the given Row to\n include.\n\t\n Update: A dictional entry of \"Column Name\": \"Function Name\".\n If the Column Name is part of the data precented from\n the OpenManage database, then the cell for Row:Column\n will be modified using the Function Name provided.\n The Function is defined in the python library\n updatecells.py that is part of the ECScmdb packages.\n This should be the only python library that needs to\n be modified.\n\n In addition to the config section(s), the yaml file also must\n include the yaml variable \"section:\" which indicates which of the\n config sections to process.\n\n### filter.yml example file\n```\nHere is an example filter.yml file with one config section. Because the\n\"section:\" variable is set to 1 in this example the first section, with \nname \"Partial\", will be used.\n\n---\nsection: 1\nconfig:\n - name: Partial\n column_header: InventoryType\n rename_columns:\n Ports: \"Mac Address\"\n\n sort_columns:\n - InventoryType\n - DeviceDescription\n - DeviceName\n - InstanceId\n - NicId\n - CapabilityType.CapabilityId\n - CapabilityType.Description\n - CapabilityType.IdOwner\n - CapabilityType.Name\n - DiskNumber\n - DnsName\n - EndDate\n - EntitlementId\n - Id\n - IdOwner\n - LicenseDescription\n - LicenseType.LicenseId\n - LicenseType.Name\n - Name\n - Number\n - SasAddress\n - SerialNumber\n - ServiceTag\n - SlotNumber\n - SoldDate\n\n filters:\n -\n row: serverProcessors\n columns:\n - InstanceId\n - InventoryType\n - ModelName\n - NumberOfCores\n -\n row: serverFcCards\n columns:\n - DeviceDescription\n - DeviceName\n - InventoryType\n - VirtualWwn\n - VirtualWwpn\n - Wwn\n - Wwpn\n -\n row: serverOperatingSystems\n columns:\n - Hostname\n - InventoryType\n - OsName\n -\n row: serverArrayDisks\n columns:\n - BusType\n - DiskNumber\n - InventoryType\n - MediaType\n - ModelNumber\n - SerialNumber\n - Size\n -\n row: serverMemoryDevices\n columns:\n - DeviceDescription\n - InstanceId\n - InventoryType\n - ManufacturerDate\n - Name\n - SerialNumber\n - Size\n - Speed\n - TypeDetails\n -\n row: serverNetworkInterfaces\n columns:\n - InventoryType\n - NicId\n - Ports\n update:\n Ports: update_ports\n -\n row: chassisSlotsList\n columns:\n - DnsName\n - InventoryType\n - Model\n - Name\n - Number\n - Occupied\n - ServiceTag\n -\n row: chassisControllerList\n columns:\n - InventoryType\n - Name\n -\n row: deviceManagement\n columns:\n - DnsName\n - EndPointAgents\n - InstrumentationName\n - InventoryType\n - IpAddress\n - MacAddress\n - ManagementId\n - ManagementType.Description\n - ManagementType.Name\n update:\n EndPointAgents: update_end_point_agents\n -\n row: nicInformation\n columns:\n - Description\n - DeviceId\n - InventoryType\n - Ipv4_address\n - Mac_address\n - Subnet_mask\n...\n```\n\n### cmdb.pw\n cmdb.pw is a python AES encripted password file. It must contain the\n following two entries: \n\n 1. A key that matches the OME_Login variable from the cmdb.yml\n file. The value of the entry is the password for that user.\n\n 2. A key named \"OMEHost\" (case-sensitive string). The value of\n the entry is the URL for the OpenManage host.\n\n### Adding or updating an entry in the cmdb.pw file\n\n Execute \"cmdb --add=STRING\", where STRING is the key to be created\n or updated. cmdb will then prompt for the value for the given\n key. The entries are encripted and stored in the cmdb.pw file.\n\n### Example \n\n # cmdb --add=xyzzy\n Enter password for user 'xyzzy':\n #\n\n### Deleting an entry from the cmdb.pw file\n\n Execute \"cmdb --delete=STRING\", where STRING is the key to be\n deleted. The entries will be deleted without prompting.\n\n### Example\n\n # cmdb --delete=xyzzy\n #\n\n### List the keys or keys/values stored n the cmdb.pw file\n\n Execute \"cmdb --list\" to list all of the keys in the cmdb.pw file,\n or \"cmdb --list --verbose\" to list both the keys and the values\n for each key.\n\n### Examples\n\n # cmdb --list\n # cmdb --list --verbose\n\n## cmdbdiff\n\n Before cmdbdiff can be used to compare two OpenManage\n spreadsheets, created using the cmdb command, the file\n cmdbdiff.yml must be created. This file is located in the\n directory etc/ecscmdb, which is relative to the virtualenv\n directory ecscmdb was installed in.\n\n### cmdbdiff.yml\n\n cmdbdiff.yml is a yaml file. The yaml file can have multiple\n \"config\" sections defined within it. There must be at least one\n config section in it. In addition to the config section(s), the\n yaml file also must include the yaml variable \"section:\" which\n indicates which of the config sections to process.st be at lease\n one config section. Each config secion has the following fields:\n\n name: The name of the configuration section \n (optional).\n admin: The Admin managing cmdbdiff.\n name: The Admin name.\n email: The Admin email address.\n phone: The Admin phone number.\n log_level: The python log level cmdb will run at. \n Must be one of DEBUG, INFO, WARNING, ERROR, \n CRITICAL, or TRACE.\n log_dir: The location of the cmdb log directory \n relative to virtualenv base directory cmdb \n was installed in.\n report: The location of the cmdbdiff report file \n that cmdbdiff writes to. The name of the \n file can include the jinja2 variable \n \"{{ TOD }}\" to include the current date and \n time.\n email: The email section indicates who should \n receive a copy of the cmdbdiff report.\n subject: The subject line of the report email.\n from: The name and email address of the user \n sending the report.\n name: The sending name.\n email: The sending email address.\n to: A list of zero or more \"to\" email addresses.\n name: The outgoing name.\n email: The outgoing email address.\n cc: A list of zero or more \"cc\" email addresses. \n name: The outgoing name.\n email: The outgoing email address.\n text: The text of the email that is sent.\n with_changes: The text of the email being if there are \n changes between the spreadsheets being \n checked.\n without_changes: The text of the email being if there are no \n changes between the spreadsheets being \n checked. \n\n In addition to the config section(s), the yaml file also must include \n the yaml variable \"section:\" which indicates which of the config sections\n to process.\n\n### jinja2 variables used in the cmdbdiff.yml file\n\n```\nThere are several jinja2 variables that can be used in the cmdbdiff.yml \nconfiguration file. Here is a list with a description of their values:\n\nTOD: The current Date and Time.\nDATE: The currect Date.\nTIME: The current Time.\nHOST: The Host name the report was generated on.\nVERSION: The Version of the cmdbdiff program.\nSPREADSHEET1: The name of the first spreadsheet being checked.\nWORKSHEETS1: The number of Worksheets in the spreadsheet 1.\nSPREADSHEET2: The name of the second spreadsheet being checked.\nWORKSHEETS2: The number of Worksheets in the spreadsheet 2.\nREPORT: The name of the report file (from config.report).\nADMINNAME: The name of the cmdbdiff Admin (from config.admin.name).\nADMINEMAIL: The email address of the cmdbdiff Admin (from \n config.admin.email).\nADMINPHONE: The phone number of the cmdbdiff Admin (from \n config.admin.phone).\n```\n\n### cmdbdiff.yml example file\n\n```\nHere is an example cmdb.yml file with one config sections. The \"section:\" \nvariable is set to 1 in this example the second section, with name \n\"Configuration file Production\", will be used.\n\n---\nsection: 1\nconfig:\n - name: Configuration file Production.\n admin:\n name: Bill Jones\n email: BJ@example.com\n phone: 999.555.1234\n log_level: warning\n log_dir: log\n report: report/OpenManage-cmdbdiff-{{ TOD }}.xlsx\n email:\n subject: CMDB Diff Report generated on {{ DATE }} at {{ TIME }} on server {{ HOST }}.\n from:\n name: CMDB Diff Report\n email: CMDB-Diff-Report@{{ HOST }}\n to:\n -\n name: John Smith\n email: JS@example.com\n -\n name: Steve Thomas\n email: ST@example.com\n cc:\n -\n name: Tim George\n email: TG@example.com\n text:\n with_changes:\n\n \"\\nCMDB Diff report, Version {{ VERSION }}, generated on {{ DATE\n }} at {{ TIME }} on server {{ HOST }}.\\n\n\n There are three attached spreadsheets in this report:\\n\n\n 1) {{ SPREADSHEET1 }}, is the previous CMDB spreadsheet with\n {{ WORKSHEETS1 }} worksheets.\\n\n\n 2) {{ SPREADSHEET2 }}, is an currect CMDB spreadsheet with {{\n WORKSHEETS2 }} worksheets.\\n\n\n 3) {{ REPORT }}, lists the changes between {{ SPREADSHEET1 }}\n and {{ SPREADSHEET2 }}.\\n\n\n The first worksheet in {{ REPORT }} lists a summary of all\n changes. The remaining worksheets in {{ REPORT }}, if any, are\n copies of the worksheets in {{ SPREADSHEET2 }} that are\n different from {{ SPREADSHEET1 }}.\\n\n\n Contact {{ ADMINNAME }} at email address {{ ADMINEMAIL }} or\n phone number {{ ADMINPHONE }} if you have questions or\n concerns regarding any of the spreadsheets generated in this\n report.\\n\n\n Thanks!\\n\"\n\n without_changes:\n\n \"\\nCMDB Diff report, Version {{ VERSION }}, generated on {{ DATE\n }} at {{ TIME }} on server {{ HOST }}.\\n\n\n The CMDB Diff report found no changes between {{\n SPREADSHEET1 }} and {{ SPREADSHEET1 }} on {{ DATE }}.\\n\n\n There are three attached spreadsheets in this report:\\n\n\n 1) {{ SPREADSHEET1 }}, is the previous CMDB spreadsheet with\n {{ WORKSHEETS1 }} worksheets.\\n\n\n 2) {{ SPREADSHEET2 }}, is an currect CMDB spreadsheet with {{\n WORKSHEETS2 }} worksheets.\\n\n\n 3) {{ REPORT }}, lists the changes between {{ SPREADSHEET1 }}\n and {{ SPREADSHEET2 }}.\\n\n\n Contact {{ ADMINNAME }} at email address {{ ADMINEMAIL }} or\n phone number {{ ADMINPHONE }} if you have questions or\n concerns regarding any of the spreadsheets generated in this\n report.\\n\n\n Thanks!\\n\"\n\n```\n\n# CLI Help text\n\n## # cmdb --help\n\n Program to download the data from the OpenManage DB and build a spreadsheet.\n\n Some default option values listed below can be overridden within the\n configuration file.\n\n Usage:\n cmdb [-v] [-L LEVEL] [--LOG=DIR] [-F] [-c CONFIG] [-s SECTION] [-o OUTPUT] [-p PWFILE] [-D] [-P SIZE]\n cmdb [-vl] [-L LEVEL] [--LOG=DIR] [-c CONFIG] [-s SECTION] [-a ID]... [-d ID]... [-p PWFILE] [-D]\n cmdb (-h | --help | -V | --version)\n\n There are no required options.\n\n Options:\n -h, --help Show this help message and exit.\n -V, --version Show version information and exit.\n -F, --full Show all data, no filtering.\n -c CONFIG, --config=CONFIG The configuration file.\n Default: \"/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdb.yml\"\n -s SECTION, --section=SECTION The configuration file version (default\n defined within the configuration file).\n -o OUTPUT, --output=OUTPUT Output file or directory.\n Default: \"/home/tom/Run/ECScmdb/Testing/output/OpenManage-cmdb.2023-02-08-18-14-30.xlsx\"\n -p PWFILE, --pw=PWFILE The password file. This file is used when a\n login to a website or webpage is required.\n Default: \"/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdb.pw\"\n -l, --list List all of the IDs in the password file and\n exit. If both the --list and --verbose\n options are included, list both IDs and\n Passwords and exit.\n -a ID, --add=ID Add (or update) an ID and Password and exit.\n Program will prompt for the Password to be\n saved to the password file.\n -d ID, --delete=ID Delete an ID (if it exists) from the\n password file and exit.\n -v, --verbose Print verbose messages.\n -L LEVEL, --log=LEVEL Print log messages at log value LEVEL.\n Valid levels are: TRACE, DEBUG, INFO, WARNING,\n ERROR, and CRITICAL.\n Default: WARNING\n --LOG=DIR Log directory.\n Default: \"/home/tom/Run/ECScmdb/Testing/log/cmdb.log\"\n -D, --dryrun Only print out what would be done.\n -P SIZE, --poolsize=SIZE Call OpenManage using pools of size SIZE.\n Default: set by the OS.\n\n## # cmdbdiff --help\n\n Program to analyze two spreadsheets for differences.\n\n Some default option values listed below can be overridden within the initialization file.\n\n Usage:\n cmdbdiff [-v] [-L LEVEL] [--LOG=DIR] [-c CONFIG] [-s SECTION] [-r REPORT] [-D] SPREADSHEET1 SPREADSHEET2\n cmdbdiff (-h | --help | -V | --version)\n\n Variables SPREADSHEET1 and SPREADSHEET2 are required, all other parameters are optional.\n\n Options:\n -h, --help Show this help message and exit.\n -V, --version Show version information and exit.\n -c CONFIG, --config=CONFIG The configuration file.\n Default: \"/home/tom/Run/ECScmdb/Testing/etc/ecscmdb/cmdbdiff.yml\"\n -s SECTION, --section=SECTION The configuration file version (default\n defined within the configuration file).\n -r REPORT, --report=REPORT Report directory or file.\n -v, --verbose Print verbose messages.\n -L LEVEL, --log=LEVEL Print log messages at log value LEVEL.\n Valid levels are: TRACE, DEBUG, INFO, WARNING,\n ERROR, and CRITICAL.\n Default: \"WARNING\"\n --LOG=DIR Log Directory,\n Default: \"/home/tom/Run/ECScmdb/Testing/log/cmdbdiff.log\"\n -D, --dryrun Only print out what would be done.\n \n# Git information\n[GIT Home][CMDB],\n[README File][README],\n[LICENSE File][LICENSE],\n[ChangeLog File][CHANGELOG],\n[pyproject.toml File][PYPROJECT].\n\n# About me\n[My contact information][About Me].\n\n[CMDB]: https://git.wayne.edu/ECS_Projects/ECScmdb\n[README]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/README.md\n[LICENSE]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/LICENSE.txt\n[CHANGELOG]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/ChangeLog\n[PYPROJECT]: https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/pyproject.toml\n[About Me]: https://About.Me/Thomas.R.Stevenson\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Dump the OpenManage database.",
"version": "2.0.5",
"project_urls": {
"About Me": "https://About.Me/Thomas.R.Stevenson",
"License": "https://git.wayne.edu/ECS_Projects/ECScmdb/-/blob/master/LICENSE.txt"
},
"split_keywords": [
"cmdb",
"cmdbdiff"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eb4f45f441200e374eac08713825c82fbbaf62941c18ef5405c2ad3636391c8c",
"md5": "a390e98a287217277669c1735e6e9733",
"sha256": "5ba0cafd054aa0e74130738aa1515c6ad9a1c1906c82af61f6570575b29e5737"
},
"downloads": -1,
"filename": "ecscmdb-2.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a390e98a287217277669c1735e6e9733",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 39147,
"upload_time": "2023-12-21T19:49:35",
"upload_time_iso_8601": "2023-12-21T19:49:35.599039Z",
"url": "https://files.pythonhosted.org/packages/eb/4f/45f441200e374eac08713825c82fbbaf62941c18ef5405c2ad3636391c8c/ecscmdb-2.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ae6938858de49db4a42b5ab8239e43d35c8b966ddea7cab82fb5ceca89877bcf",
"md5": "ef66c2d4999b3aec087ffad42d80fe52",
"sha256": "5f0c6b7424fa659f02ef43905da878b8007e242c6535f37bb6621c91edb0c21e"
},
"downloads": -1,
"filename": "ecscmdb-2.0.5.tar.gz",
"has_sig": false,
"md5_digest": "ef66c2d4999b3aec087ffad42d80fe52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 29676,
"upload_time": "2023-12-21T19:49:37",
"upload_time_iso_8601": "2023-12-21T19:49:37.171663Z",
"url": "https://files.pythonhosted.org/packages/ae/69/38858de49db4a42b5ab8239e43d35c8b966ddea7cab82fb5ceca89877bcf/ecscmdb-2.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-21 19:49:37",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "ecscmdb"
}