smipyping - SMI lab support tools¶
smipyping is set of wbem clients, written in pure Python. It supports Python 2 and Python 3.
A WBEM client allows issuing operations to a WBEM server, using the CIM operations over HTTP (CIM-XML) protocol defined in the DMTF standards DSP0200 and DSP0201. The CIM/WBEM infrastructure is used for a wide variety of systems management tasks supported by systems running WBEM servers. See WBEM Standards for more information about WBEM.
This package is based on the idea that a good WBEM client should be easy to use and not necessarily require a large amount of programming knowledge. It is suitable for a large range of tasks from simply poking around to writing web and GUI applications.
The general pywbem web site is: http://pywbem.github.io/pywbem/index.html.
Introduction¶
Functionality¶
This python package provides the functionality to maintain information on the status of a number of servers in a WBEM Server environment and to explore the details of the WBEM Servers in that environment.
It includes several command line tools and a database of the WBEM Servers in the environment.
Supported environments¶
Currently smipyping is supported on Python 2.7 environments and tested on Linux operating systems
Installation¶
The following examples show different ways to install smipyping. They all ensure that prerequisite Python packages are installed as needed:
Install a particular branch from the Git repository:
$ pip install git+https://github.com/smipyping/smipyping.git@<branch-name>
These examples install smipyping and its prerequisite Python packages into the currently active Python environment. By default, the system Python environment is active. This is probably the right choice if you just want to use the scripts that come with smipyping. In that case, you need to prepend the installation commands shown above (i.e. pip and python setup.py) with sudo, and your Linux userid needs to be authorized accordingly.
In a test user enviroment installation into a virtual Python environment is recommended).
The command syntax above is shown for Linux, but works in similar ways on Windows and OS-X.
In case of trouble with the installation, see the Troubleshooting section.
You can verify that smipyping and its dependent packages are installed correctly by importing the package into Python:
$ python -c "import smipyping; print('ok')"
ok
smipyping database¶
Because smipyping operates on a number of WBEM Servers at the same time and also maintains status of these servers over time. It depends on a database to contain information about the WBEM Servers, the WBEM Server owners, and the results of testing these servers.
smipyping uses a database in one of serveral forms (either csv files for very simple installations or a sql database for more complex installations).
The database contains the following tables:
- Companies - A table of the companies responsibile for the servers. This relates each company to one or more targets in the targets table and relates users in the users table to companies.
- Targets - A table of the WBEM Servers to be tested with smipyping. This includes key information about each server that cannot be derived from knowing only the host name of the server including passwords. Any information that can be derived from the servers themselves is normally not maintained in this table.
- Users - A table of users primarily as a means of contacting the personnel responsible for each server and as a desination for reports. This table relates each user to an entry in the companies table.
- Pings - A table that is augmented when status checks are run on
the servers. It provides historical information on the status of
those checks for each server (up/down, etc.). This table is updated when
the command
smicli cimping all --saveresult
is run adding the status of each server test to the pings table. Each status entry identifies the target, time, and status returned from the ping. - Notifications - A table showing what notifications of server status changes have been sent.
- Programs - A table showing the programs defined by SMI. This is only used to define a program for each year and only used to send the regular weekly report. Each program includes a name, start date, and end date.
We intend to make this database as general but as simple as possible however, for the moment is can be either a simple csv file database or a more general sql database using mysql.
Normally the database is maintained outside of smipyping using tools for that database. Thus for csv files, an editor suffices if the csv database form is used.
However, for the mysql database a tool such as the mysql workbench is useful to be able to add entries, delete entries, make modifications, etc.
We have included the capability to update, add, delete, and clean the tables for a number of these tables directly from smicli.
Database structure¶
The following diagram shows the interaction between the different tables in the database.
+----------+
| Programs |
| Table | +--------------+
+----------+ | Targets |
| Table <------+ targetID
+----+---------+ |
| CompanyID |
+----------+ +-----v-------+ +----+------+
| | | | | |
| Users +--^+ Companies | | Pings |
| Table | | Table | | Table |
| | | | | |
+----------+ +-------------+ +-----------+
Alternative Databases¶
Today we do not test with any alternative databases. We are looking at sqllite for the next release partly because it is integrated into python.
We can run with a simple csv database for the targets table. However, this has many limitations including the fact that it cannot create entries in a pings table today so it is good for current status reports but does not save history.
Database schema¶
The database schema defines the various tables in the database.
MySQL Database¶
Although the schema may change with new versions of smipyping, the following is the schema for smipyping version 0.7.0:
--
-- Table structure for table `Companies`
--
CREATE TABLE IF NOT EXISTS `Companies` (
`CompanyID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`CompanyName` varchar(30) NOT NULL,
PRIMARY KEY (`CompanyID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=34 ;
--
-- Table structure for table `LastScan`
--
CREATE TABLE IF NOT EXISTS `LastScan` (
`ScanID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`LastScan` datetime NOT NULL,
PRIMARY KEY (`ScanID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
--
-- Table structure for table `Notifications`
--
CREATE TABLE IF NOT EXISTS `Notifications` (
`NotifyID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`NotifyTime` datetime NOT NULL,
`UserID` varchar(20) NOT NULL,
`TargetID` int(11) NOT NULL,
`Message` varchar(100) NOT NULL,
PRIMARY KEY (`NotifyID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=55522 ;
--
-- Table structure for table `Pings`
--
CREATE TABLE IF NOT EXISTS `Pings` (
`PingID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`TargetID` int(11) unsigned NOT NULL,
`Timestamp` datetime NOT NULL,
`Status` varchar(255) NOT NULL,
PRIMARY KEY (`PingID`)
--
-- Table structure for table `PreviousScans`
--
CREATE TABLE IF NOT EXISTS `PreviousScans` (
`ScanID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`TimeStamp` datetime NOT NULL,
PRIMARY KEY (`ScanID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
--
-- Table structure for table `Program`
--
CREATE TABLE IF NOT EXISTS `Program` (
`ProgramID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ProgramName` varchar(15) NOT NULL,
`StartDate` date NOT NULL,
`EndDate` date NOT NULL,
PRIMARY KEY (`ProgramID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;
--
-- Table structure for table `Targets`
--
CREATE TABLE IF NOT EXISTS `Targets` (
`TargetID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`IPAddress` varchar(15) NOT NULL,
`CompanyID` int(11) unsigned NOT NULL,
`Namespace` varchar(30) NOT NULL,
`SMIVersion` varchar(15) DEFAULT NULL,
`Product` varchar(30) NOT NULL,
`Principal` varchar(30) NOT NULL,
`Credential` varchar(30) NOT NULL,
`CimomVersion` varchar(30) DEFAULT NULL,
`InteropNamespace` varchar(30) DEFAULT NULL,
`Notify` enum('Enabled','Disabled') NOT NULL DEFAULT 'Disabled',
`NotifyUsers` varchar(12) DEFAULT NULL,
`ScanEnabled` enum('Enabled','Disabled') NOT NULL DEFAULT 'Enabled',
`Protocol` varchar(10) NOT NULL DEFAULT 'http',
`Port` varchar(10) NOT NULL,
PRIMARY KEY (`TargetID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=123 ;
--
-- Table structure for table `Users`
--
CREATE TABLE IF NOT EXISTS `Users` (
`UserID` int(11) unsigned NOT NULL AUTO_INCREMENT,
`Firstname` varchar(30) NOT NULL,
`Lastname` varchar(30) NOT NULL,
`Email` varchar(50) NOT NULL,
`CompanyID` int(11) NOT NULL,
`Active` enum('Active','Inactive') NOT NULL,
`Notify` enum('Enabled','Disabled') NOT NULL,
PRIMARY KEY (`UserID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=81 ;
CSV database¶
NOTE: The CSV database capabilityh is currently disabled.
The schema for a csv database is simply the column names as shown below.
TargetID,CompanyName,Namespace,SMIVersion,Product,Principal,Credential,CimomVersion,IPAddress,InteropNamespace,Protocol,Port,ScanEnabled
This database uses the CompanyName directly rather than an ID to point to a companies table.
The following is an example of a row in a csv table:
01,Inova,root/cimv2,,OpenPegasus,,,OpenPegasus,mypw,interop,http,5988,Enabled
Database Installation and Setup¶
MySQL Database¶
The MySQL Dabase setup involves several steps including:
- Install database software consistent with the OS
- Install the SMIStatus schema name
- Install the database from a previous download of the database or from the schema to create empty tables.
Install MySQL Database
This step is OS dependent. Note, that for the time being we are using MySQL 5.7 or its equivalent more information on the stability of the new MySQL database 8.0 release.
See information on MySQL database installation appropriate for the OS
Create the SMIStatus Database.
This step is normally required before the database can be loaded from an existing dump or from the schema. The instructions below assume that the cmd line mysql utility that is part of MySQL is being used to install the db
With MySQL installed and running
- Start the mysql utility (mysql -u xxxx -p)
- Determine if this db is installed (SHOW DATABASES)
- If SMIStatus is not installed DATABASE CREATE SMIStatus
- Again do SHOW DATABASES to insure it is created.
- exit:
- mysql -u xxx -p < (Name of sql dump file?
Be sure the password and user name are correct in the smicli.ini file:
# # Logon credentials for the mysql database. # user = (Name of mysql user) password = (MySQL password for the defined user)
Confirm that the db install worked by testing several smicli commands that access the db including: a smicli users list b. smicli programs list c. smicli targets list
smipyping utility commands¶
smicli¶
smicli
is the common command line tool for smipyping It is a
single command line utility with command groups and commands.
smicli
uses a single integrated configuration file It includes a number of
command groups each of which includes one or more commands (ie. in the
manner of many newer cmd line tools).
smicli
is more completely defined in subsequent sections of this documentation.
The subcommand groups include:
- cimping Command group to do simpleping.
- explorer Command group for general provider explore.
- help Show help message for interactive mode.
- provider Command group for simple provider operations.
- repl Enter interactive (REPL) mode (default).
- sweep Command group to sweep for servers.
- targets Command group for managing targets data.
NOTE: There may be more subcommand groups an any specific release.
Details on the use of smicli
are in the following sections
In addition, smipyping includes utilities to aid in defining and working with the databases documented in section Database tools:
smicli Configuration File¶
Because the smicli operate off of number of parameters, much of the configuration uses a configuration file to define core parameters.
The default name for the configuration file is smicli.ini and it is normally executed from the directory where smicli (or the other utilities) are executed. smicli looks for the file in the directory from which it is run. Entries in the configuration file can also be included on the command line. However, in general the config file makes the use of smicli
This file includes information about:
- The database. Identifies the database type, and other configuration information so that the database can be opened
- output report formats - Default output format for reports
- Logging parameters - Defines the level for logging.
- other specialcharacteristics of each of the utilities.
The configuration file is in the standard ini format with sections and name/value defintions within each section
Configuration File Sections¶
The configuration file includes the following sections:
- General - Those parameters that are considered general to the startup of the utilities
- mysql - Parameters used for the startup of a mysql database
- csv - Parameters for the startup of a csv database
- log - Parameters that define logging.
Note that some the parameters in the configuration file may be overwritten by corresponding command line inputs.
Configuration file example¶
The following is an example of an smicli configuration file
# -- FILE: smicli.ini
# general parameters
[general]
dbtype = mysql
# connection parameters for a mysql database
[mysql]
host = localhost
database = SMIStatus
user = *******
password = ******
# parameters for a csv database
[csv]
filename = targetdata_example.csv
# parameters for an sqllite database
[sqllite]
TODO
[log]
# define the level of logging
loglevel = debug
smicli
Command line interface¶
This package provides a command line interface (smicli
) tool
that supports communication with a WBEM server through the pywbem client
api and shell scripting.
Modes of operation¶
smicli supports two modes of operation:
- Interactive mode: Invoking an interactive smicli shell for typing smicli sub-commands.
- Command mode: Using it as a standalone non-interactive command.
Interactive mode¶
In interactive mode, an interactive shell environment is brought up that allows typing smicli commands, internal commands (for operating the smicli shell), and external commands (that are executed in the standard shell for the user).
This smicli shell is started when the smicli
command is invoked without
specifying any (sub-)commands:
$ smicli [GENERAL-OPTIONS]
> _
Alternatively, the pywbemcl shell can also be started by specifying the repl
(sub-)command:
$ smicli [GENERAL-OPTIONS] repl
> _
The smicli shell uses the >
prompt, and the cursor is shown in the examples
above as an underscore _
.
General options may be specified on the smicli
command, and they serve as
defaults for the smicli commands that can be typed in the smicli shell and
as the definition of the connection to a WBEM Server.
The smicli
commands that can be typed in the smicli
shell are simply the command
line arguments that would follow the smicli
command when used in
command mode:
$ smicli
> targets id 4
. . . display of the definition of target with id = 4
> targets id 5
. . . display of the definition of target with id = 5
> :q
For example, the smicli shell command targets id 4
in the example
above has the same effect as the standalone command:
$ smicli targets id 4
. . . display of the definition of target with id = 4
See also Environment variables.
The internal commands :?
, :h
, or :help
display general help
information for external and internal commands:
> :help
REPL help:
External Commands:
prefix external commands with "!"
Internal Commands:
prefix internal commands with ":"
:?, :h, :help displays general help information
:exit, :q, :quit exits the repl
In this help text, “REPL” stands for “Read-Execute-Print-Loop” which is a term that denotes the approach used in the smicli shell.
In addition to using one of the internal shell commands shown in the help text above, you can also exit the smicli shell by typing Ctrl-D.
Typing --help
in the smicli shell displays general help information for the
smicli commands, which includes global options and a list of the supported
commands:
> --help
General command line script for smicli. This script executes a number of
subcommands to:
* Explore one or more smi servers for basic WBEM information and
additional information specific to SMI.
* Manage a database that defines smi servers. It supports two forms
of the data base, sql database and csv file.
Options:
-c, --config_file TEXT Configuration file to use for config information.
-v, --verbose Display extra information about the processing.
--version Show the version of this command and exit.
--help Show this message and exit.
Commands:
database Command group for operations on provider data...
explorer Command group for general provider explore.
help Show help message for interactive mode.
provider Command group for simple operations on...
repl Enter interactive (REPL) mode (default) and...
Note that -h
can be uses as a shortcut for --help
throughout smicli
.
The usage line in this help text show the standalone command use. Within the
smicli shell, the smicli
word is ommitted and the remainder is typed in.
Typing COMMAND --help
in the smicli shell displays help information for the
specified smicli command, for example:
> provider --help
Usage: smicli provider [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to inspect providers.
Options:
--help Show this message and exit.
Commands:
...
The smicli shell supports popup help text while typing, where the valid choices
are shown based upon what was typed so far, and where an item from the popup
list can be picked with <TAB> or with the cursor keys. In the following
examples, an underscore _
is shown as the cursor:
> --_
database Command group for operations on provider data...
explorer Command group for general provider explore.
help Show help message for interactive mode.
provider Command group for simple operations on...
repl Enter interactive (REPL) mode (default) and...
The smicli shell supports history (within one invocation of the shell, not persisted across smicli shell invocations).
Command mode¶
In command mode, the smicli
command performs its task and terminates,
like any other standalone non-interactive command.
This mode is used when the smicli
command is invoked with a (sub-)command:
$ smicli [GENERAL-OPTIONS] COMMAND [ARGS...] [COMMAND-OPTIONS]
Examples:
$ smicli cimping http://localhost -n root/cimv2 -u username
. . . <TODO>
In command mode, bash tab completion is also supported, but must be enabled first as follows (in a bash shell):
$ eval "$(_SMICLI_COMPLETE=source smicli)"
Bash tab completion for smicli
is used like any other bash tab completion:
$ smicli --<TAB><TAB>
... <shows the global options to select from>
$ smicli <TAB><TAB>
... <shows the commands to select from>
$ smicli database <TAB><TAB>
... <shows the database sub-commands to select from>
Environment variables¶
The smicli CLI has environment variable options corresponding to the command line options for specifying the general options to be used including:
- SMI_CONFIG_FILE - The absolute path to the configuration file
- SMI_DB_TYPE - The typd of database
- SMI_LOG_LEVEL - The log level
- SMI_OUTPUT_FORMAT - The output format for reports, etc.
If these environment variables are set, the corresponding general option on the command line is not required and the value of the environment variable is used.
Thus, in the following example, the second line accesses the configuration file blah.ini
$ export SMICLI_CONFIG_FILE=blah.ini
$ smicli ...
Passwords¶
The current `` smicli`` implementation does not support encrypted, hidden, etc. passwords. Passwords (credentials) are defined in:
- The options for some of the subcommands (ex.
smicli cimping host
)
2. The targets database. There is are specific columns in the database for users(prinicpals) and passwords(credentials)
3. A standard default credential and user name that will be used if none are provided. This allows simplification of the database if the targets can all be defined to use a standard user name and password.
FUTURE; We may elect to protect credentials in the future but that is an open question today.
smicli subcommand options¶
smicli
contains a number of command groups and subcommands. Each subcommand
may have arguments and options (defined with -h or –help as part of the
name). While many arguments and options are specific to each subcommand, there
are several options that are general and and are defined as part of the smicli
command.
- verbose - defines the verbosity of output. Normally only used for debugging
- log - Defines the level of logging
- output_format - Defines the output format for tables.
Thus to use verbose with a subcommand:
smicli -v cimping all
See the smicli
help for the definition of all current general options
smicli subcommands¶
Generally the structure of smicli is:
smicli <general options> <cmd-group> <subcommand> <subcommand arguments> <subcommand options>
Generally each command group is a noun, referencing some entity (ex. targets
refers to operation on the targets (definitions of wbem servers to be tested).
The subcommands are generally actions on
those entities defined by the group name. Thus targets
is a group and
list
is a subcommand so:
Defines a command to list the items in the targets list on stdout.
Subcommand groups¶
The subcommand groups fall into the following catagories:
1. Actions - This includes cimping, sweep, and explorer. These define actions upon the targets.
2. Table management - There is a group for each database table (ex. companies, targets, programs, etc.). These subcommands for managing each of the tables including viewing the table, and maintaining entries in the table. Note that the history group is really the manager for the pings table
3. General - The help and repl subcommands are provide access to the help information and execute the repl mode.
The command groups available for smicli are:
cimping: - Command group to do simpleping on providers to determine general status of the provider. This command group executes an optional ping using the OS level ping and if that is successful a single request for a known entity (ex. CIMClass) on the WBEM Server to determine status. Generally it establishes that the smicli can connect to the server and that the expected namespace and class exist.
This command returns a number of possible errors for exception responses indicating the type of error received. See WBEM server error codes for details of the error codes.
explorer: - Command group to explore providers. This group provides commands to explore status and state of providers including profiles, namespaces, general size of tables, etc.
provider: - Command group for detailed provider operations. This allows users to explore providers (targets) in detail.
sweep: - Command group to sweep for servers. Allows testing all addresses in a range of ip address for possible WBEM Servers and determining if these are already in the targets table. Typically a search would be executed for all IP addresses in a known subnet and for selected ports. This command first finds ipaddress/port combinations that respond to the ping and the scan option. If the results of these tests indicate that there may be a WBEM server, it first confirms if the server is already known in the targets table. If the server is known, information on the server (company, etc.) is added to the report. If it is not known, the sweep tool executes further tests including 1) all logical Principal and Credentials (taken from the target table) and possible namespaces to determine if a WBEM Server exists and reports what it finds.
history: - Command group to manage the history (pings) table. This includes a number of reports to summarize history of individual and all provider status over time periods. It also include a subcommand specifically to execute the smilab weekly report smicli history weekly.
programs: - Command group to view and manage the programs table. This table is the definition of a single SMI program and defines the program name, start date and end date. Provides the capability to list and modify entries.
- targets: - Command group for managing targets data. This is the table of providers currently defined and includes information on the address, security, etc on each entry. Normally it includes information that cannot be retrievied from the providers themselves. This subcommand allows listing and managing the entries of the targets table.
- companies: - Command group to manage the companies table. The companies table defines the company names of the each company involved and has references in the targets table, and the users table so that the entries in these tables can be linked to a company This group provides viewing and managing entries in the table.
- users: - Command group to process the users table. The users table defines users associated with a company including email addresses so that notifications, reports, etc. can be forwarded to users concerning status and status changes of the targets. This group provides viewing and managing entries in the table.
- notifications - Command group to manage the notifications table. The notifications table is a history of notifications sent concerning changes to target status.
- help: - Show help message for interactive mode.
- repl: Enter interactive (REPL) mode (default).
smicli Help Command Details¶
This section defines the help output for each smicli command group and subcommand.
The following defines the help output for the smicli –help subcommand
Usage: smicli [GENERAL-OPTIONS] COMMAND [ARGS]...
Command line script for smicli. This script executes a number of
subcommands to:
* Explore one or more smi servers for basic WBEM information and
additional information specific to SMI.
* Manage a database that defines smi servers, users, company names
and history. It supports two forms of the data base, sql database
and csv file.
* Sweep ranges of ip addresses and ports to find wbem servers.
Options:
-c, --config_file TEXT Configuration file to use for config
information.
-d, --db_type [csv|mysql|sqlite]
Database type. May be defined on cmd line,
config file, or through default. Default is
mysql.
-l, --log COMP=LEVEL,... Set a component to a log level (COMP: [all|c
li|pywbem|pywbemapi|pywbemhttp|api|groups],
LEVEL: [critical|error|warning|info|debug],
Default: all=error).
--log-dest [file|stderr|none] Log destination for this command (Default:
file).
-o, --output-format [table|plain|simple|grid|psql|rst|mediawiki|html]
Output format (Default: simple). smicli may
override the format choice depending on the
operation since not all formats apply to all
output data types.
-v, --verbose Display extra information about the
processing.
--version Show the version of this command and exit.
-h, --help Show this message and exit.
Commands:
cimping Command group to do cimping.
companies Command group for Companies table.
explorer Command group to explore providers.
help Show help message for interactive mode.
history Command group manages history(pings) table.
notifications Command group for notifications table.
programs Command group to handle programs table.
provider Command group for provider operations.
repl Enter interactive (REPL) mode (default).
sweep Command group to sweep for servers.
targets Command group for managing targets data.
users Command group to handle users table.
smicli cimping –help¶
The following defines the help output for the smicli cimping –help subcommand
Usage: smicli cimping [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to do cimping.
A cimping executes a system level ping (optional) and then tries to create
a connection to the target WBEM serve and execute a simple WBEM operation.
This generally tests both the existence of the WBEM server with the ping
and the a ability to make a WBEM connection and get valid results from the
WBEM server. The operation executed is EnumerateClasses on one of the
known namespaces
This allows target WBEM servers to be defined in a number of ways
including:
- Complete target identification (url, etc.) (host)
- Target Id in the database.
- All targets in the database.
Simple ping is defined as opening a connection to a wbem server and
executing a single command on that server, normally a getClass with a well
known CIMClass.
Options:
-h, --help Show this message and exit.
Commands:
all CIMPing all enabled targets in database.
host cimping wbem server defined by hostname.
id Cimping one target from database.
ids Cim ping a list of targets from database.
smicli cimping all –help¶
The following defines the help output for the smicli cimping all –help subcommand
Usage: smicli cimping all [COMMAND-OPTIONS]
CIMPing all enabled targets in database.
Executes the ping on all enabledtargets in the targets table of the
database.
Creates a table of results and optionally logs status of each target in
the Pings table (--saveresult option).
This subcommand also compares the results with previous results in the
pings table and marks any targets that have changed with an asterik ("*")
as a flag.
ex. smicli cimping all
Options:
-s, --saveresult Save the result of each cimping test of a wbem server
to the database Pings table for future analysis.
Saving the results creates an audit log record.
(Default: False).
-d, --disabled If set include disabled targets in the cimping scan.
(Default: False).
-t, --timeout INTEGER Timeout in sec for the pywbem operations to test the
server. (Default: 10).
--no-ping If set this option disables network level ping of the
wbem server before executing the cim request. Since
executing the ping does not cause significant time
delay and helps define servers that are not
respondingat all, normally it should not be set. The
ping uses available ping program to execute the ping.
-d, --debug If set this options sets the debug parameter for the
pywbem call. Displays detailed information on the
call and response.
--no-thread If set run test single-threaded if no-thread set.
This option exists to aid debugging if issues occur
with multithreading or the servers responses in
general. If not set, the requests to each server are
issued in parallel using multi-threading.
-h, --help Show this message and exit.
smicli cimping host –help¶
The following defines the help output for the smicli cimping host –help subcommand
Usage: smicli cimping host [COMMAND-OPTIONS] HOST NAME
cimping wbem server defined by hostname.
Host name or url of the WBEM server in this format:
[{scheme}://]{host}[:{port}]
- scheme: Defines the protocol to use;
- "https" for HTTPs protocol
- "http" for HTTP protocol.
Default: "https".
- host: Defines host name as follows:
- short or fully qualified DNS hostname,
- literal IPV4 address(dotted)
- literal IPV6 address (RFC 3986) with zone
identifier extensions(RFC 6874)
supporting "-" or %%25 for the delimiter.
- port: Defines the WBEM server port to be used
Defaults:
- HTTP - 5988
- HTTPS - 5989
Options:
-n, --namespace TEXT Namespace for the operation. (Default: root/cimv2).
-u, --user TEXT Optional user name for the operation. (Default:
smilab).
-p, --password TEXT Optional password for the operation. (Default;
F00sb4ll).
-t, --timeout INTEGER Namespace for the operation. (Default: 10).
--no-ping BOOLEAN Disable network ping ofthe wbem server before
executing the cim request. (Default: True).
-d--debug BOOLEAN Set the debug parameter for the pywbem call.
Displays detailed information on the call and
response. (Default: False).
-c--verify_cert BOOLEAN Request that the client verify the server cert.
(Default: False).
--certfile TEXT Client certificate file for authenticating with the
WBEM server. If option specified the client
attempts to execute mutual authentication. Default:
Simple authentication).
--keyfile TEXT Client private key file for authenticating with the
WBEM server. Not required if private key is part of
the certfile option. Not allowed if no certfile
option. Default: No client key file. Client private
key should then be part of the certfile).
-h, --help Show this message and exit.
smicli cimping id –help¶
The following defines the help output for the smicli cimping id –help subcommand
Usage: smicli cimping id [COMMAND-OPTIONS] TargetID
Cimping one target from database.
Executes a simple ping against one target wbem servers in the target
database and returns exit code in accord with response. Exits interactive
mode and returns exit code corresponding to test result.
This test sets a cmd line exit code corresponding to the status of a given
target WBEM Server.
This subcommand will interactively let user select the TargetID or use
the wildcard "?" to request a selection list of target ids.
ex. smicli cimping 5 smicli cimping ?
Options:
-t, --timeout INTEGER Timeout in sec for the pywbem operations to test the
server. (Default: 10).
--no-ping If set this option disables network level ping of the
wbem server before executing the cim request. Since
executing the ping does not cause significant time
delay and helps define servers that are not
respondingat all, normally it should not be set. The
ping uses available ping program to execute the ping.
-d, --debug If set this options sets the debug parameter for the
pywbem call. Displays detailed information on the
call and response.
-h, --help Show this message and exit.
smicli cimping ids –help¶
The following defines the help output for the smicli cimping ids –help subcommand
Usage: smicli cimping ids [COMMAND-OPTIONS] TargetIDs
Cim ping a list of targets from database.
Execute simple cim ping against the list of target ids provided for target
servers in the database defined by each id in the list of ids creates a
table showing result. The ids can be entered as arguments or by entering
the wild card "?" as the command argument which will produce a selection
list of all target ids on the console from which the user can select one
or more target ids.
ex. smicli cimping ids 5 8 9 smicli cimping ids ?
Options:
-t, --timeout INTEGER Timeout in sec for the pywbem operations to test the
server. (Default: 10).
--no-ping If set this option disables network level ping of the
wbem server before executing the cim request. Since
executing the ping does not cause significant time
delay and helps define servers that are not
respondingat all, normally it should not be set. The
ping uses available ping program to execute the ping.
-d, --debug If set this options sets the debug parameter for the
pywbem call. Displays detailed information on the
call and response.
-h, --help Show this message and exit.
smicli companies –help¶
The following defines the help output for the smicli companies –help subcommand
Usage: smicli companies [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group for Companies table.
Includes commands to view and modify the Companies table in the database.
Options:
-h, --help Show this message and exit.
Commands:
add Add a new company to the the company table.
delete Delete a company from the database.
list List companies in the database.
modify Modify company data in database.
smicli companies add –help¶
The following defines the help output for the smicli companies add –help subcommand
Usage: smicli companies add [COMMAND-OPTIONS]
Add a new company to the the company table.
Creates a new company with the defined company name.
Options:
-c, --companyname TEXT Company name for company to add to table.
-h, --help Show this message and exit.
smicli companies delete –help¶
The following defines the help output for the smicli companies delete –help subcommand
Usage: smicli companies delete [COMMAND-OPTIONS] CompanyID
Delete a company from the database.
Delete the company defined by the command argument from the database. The
command argument may be either a specific company ID or "?" to generate a
selection list on the console.
smicli companies delete ? # does select list to select company
to delete from companies table
Options:
-n, --no-verify Verify the deletion before deleting the user.
-h, --help Show this message and exit.
smicli companies list –help¶
The following defines the help output for the smicli companies list –help subcommand
Usage: smicli companies list [COMMAND-OPTIONS]
List companies in the database.
List the parameters of companies in the company table of the database.
Options:
-o, --order Sort output by company name
-h, --help Show this message and exit.
smicli companies modify –help¶
The following defines the help output for the smicli companies modify –help subcommand
Usage: smicli companies modify [COMMAND-OPTIONS] CompanyID
Modify company data in database.
Modifies the company name in the company table of the database.
The required CompanyID argument can be found by the "company list" command
or by using "?" as the argument which generates a selection list on the
console.
ex. smicli companies modify 13 -c "NewCompany Name" smicli companies
modify ? -c " NewCompanyName"
Options:
-c, --companyname TEXT New company name. [required]
-n, --no-verify Disable verification prompt before the modify is
executed.
-h, --help Show this message and exit.
smicli explorer –help¶
The following defines the help output for the smicli explorer –help subcommand
Usage: smicli explorer [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to explore providers.
This group of commands provides the tools for general explore of all
providers defined in the database.
The explore queries the providers and generates information on their state
and status including if active, namespaces, profiles, etc. It also
normally generates a log of all activity.
This information is generated by accessing the provider itself.
These subcommands automatically validates selected data from the server
against the database and creates an audit log entry for any changes. The
fields currently tested are:
* SMIVersion
Options:
-h, --help Show this message and exit.
Commands:
all Explore all targets in database.
ids Explore a list of target IDs.
smicli explorer all –help¶
The following defines the help output for the smicli explorer all –help subcommand
Usage: smicli explorer all [COMMAND-OPTIONS]
Explore all targets in database.
Execute the general explore operation on some or all the providers in the
database and generate a report on the results.
This command explores the general characteristics of the server including:
* Company - From the targets database
* Product = From the targets database
* SMI Profiles - As defined by the server itself
* Interop Namespace - Ad defined by the server
* Status - General status (i.e. CIMPing status)
* Time - Time to execute the tests
General Server information
It executes the server requests in parallel mode (multi-threaded) or by
setting a command line options single thread (if for some reason there is
an issue with the multithreading)
It generates a report to the the defined output as a table with the
formatting defined by the global format option. Default is thread the
requests speeding up the explore significantly.
There is an option to ping the server before executing the explore simply
to speed up the process for servers that are completely not available. The
default is to ping as the first step.
ex: smicli explore all
Options:
--ping / --no-ping Ping the the provider as initial step in
test. Default: ping
--thread / --no-thread Run test multithreaded. Much faster. This
option is onlyhere to aid debugging if issues
occur with multithread.Default: thread
-i, --include-disabled Include hosts marked disabled in the targets
table.
-d, --detail [full|brief|all] Generate full or brief (fewer columns)
report. Full report includes namespaces,
SMI_profiles, etc. (Default: full).
-h, --help Show this message and exit.
smicli explorer ids –help¶
The following defines the help output for the smicli explorer ids –help subcommand
Usage: smicli explorer ids [COMMAND-OPTIONS] TargetIDs
Explore a list of target IDs.
Execute the explorer on the providers defined by id. Multiple ids may be
supplied (ex. id 5 6 7)
ex: smicli explorer ids 6 7 8 smicli explorer ids ?
Options:
--ping / --no-ping Ping the the provider as initial step in
test. Default: ping
--thread / --no-thread Run test multithreaded. Much faster.
Default: thread
-d, --detail [full|brief|all] Generate all or brief (fewer columns)
report(Default: full).
-h, --help Show this message and exit.
smicli help –help¶
The following defines the help output for the smicli help –help subcommand
Usage: smicli help [OPTIONS]
Show help message for interactive mode.
Options:
-h, --help Show this message and exit.
smicli history –help¶
The following defines the help output for the smicli history –help subcommand
Usage: smicli history [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group manages history(pings) table.
The history command group processes the database pings table.
The pings table maintains entries with the results of the ``cimping all
-s`` subcommand. Each history entry contains the target id, the timestamp
for the test, and the results of the test.
It includes commands to clean the pings table and also to create various
reports and tables of the history of tests on the WBEM servers in the
targets table that are stored in the Pings table.
Because the pings table can be very large, there are subcommands to clean
entries out of the table based on program id, dates, etc.
Rather than a simple list subcommand this subcommand includes a number of
reports to view the table for:
- changes to status for particular targets.
- Consolidated history over time periods
- Snapshots of the full set of entries over periods of time.
Options:
-h, --help Show this message and exit.
Commands:
delete Delete records from pings table.
list Display history of pings in database.
overview Display overview of pingstable in database.
timeline Show history of status changes for IDs.
weekly Generate weekly report from ping history.
smicli history delete –help¶
The following defines the help output for the smicli history delete –help subcommand
Usage: smicli history delete [COMMAND-OPTIONS]
Delete records from pings table.
Delete records from the history(pings) database based on start date and
end date options and the optional list of targetids provided.
ex. smicli history delete --startdate 09/09/17 --endate 09/10/17
Because this could accidently delete all history records, this command
requires that the user provide both the start date and either the enddate
or number of days. It makes no assumptions about dates.
It also requires verification before deleting any records.
Options:
-s, --startdate DATE Start date for pings to be deleted. Format is
dd/mm/yy [required]
-e, --enddate DATE End date for pings to be deleted. Format is
dd/mm/yy
-n, --numberofdays INTEGER Alternative to enddate. Number of days to report
from startdate. "enddate" ignored if
"numberofdays" set
-t, --TargetID INTEGER Optional targetID. If included, delete ping
records only for the defined targetID and
defined time period. Otherwise all ping records
in the defined time period are deleted.
-h, --help Show this message and exit.
smicli history list –help¶
The following defines the help output for the smicli history list –help subcommand
Usage: smicli history list [COMMAND-OPTIONS]
Display history of pings in database.
It outputs a table data from the database pings table which may be
filtered by targets and dates.
The listing may be filtered a date range with the --startdate, --enddate,
and --numberofdays options.
It may also be filtered to only show a selected target WBEM server from
the targets table with the `--targetid` option
The output of this subcommand is determined by the `--result` option which
provides for:
* `full` - all records defined by the input parameters.
* `status` - listing records by status (i.e. OK, etc.) and count of
records for that status.
* `%ok` - listing the percentage of records that have 'OK' status and
the total number of ping records.
* `count` - count of records within the defined date/time range.
ex. smicli history list --startdate 09/09/17 --enddate 09/10/17
smicli history list --startdate 09/09/17 --numberofdays 9 -t 88 -t 91
smicli history list --startdate 09/09/17 --numberofdays 9 - *
# list pings for 9 days starting 9 sept 17 for targets
# selected by user (-t *)
Options:
-t, --targetIds TEXT Get results only for the defined targetIDs.
If the value is "?" a select list is
provided to the console to select the WBEM
server targetids from the targets table.
-s, --startdate DATE Start date for ping records included. Format
is dd/mm/yy where dd and mm are zero padded
(ex. 01) and year is without century (ex.
17).
Default:oldest record
-e, --enddate DATE End date for ping records included. Format
is dd/mm/yy where dd and dm are zero padded
(ex. 01) and year is without century (ex.
17).
Default:current datetime
-n, --numberofdays INTEGER Alternative to enddate. Number of days to
report from startdate. "enddate" ignored if
"numberofdays" set
-r [full|changes|status|%ok|count]
Display history records or status info on
records. "full" displays all records,
"changes" displays records that change
status, "status"(default) displays status
summary by target. "%ok" reports percentage
pings OK by Id and total count.
-h, --help Show this message and exit.
smicli history overview –help¶
The following defines the help output for the smicli history overview –help subcommand
Usage: smicli history overview [COMMAND-OPTIONS]
Display overview of pingstable in database.
This subcommand only shows the count of records and the oldest and newest
record in the pings database, and the number of pings by program.
Options:
-h, --help Show this message and exit.
smicli history timeline –help¶
The following defines the help output for the smicli history timeline –help subcommand
Usage: smicli history timeline [COMMAND-OPTIONS]
Show history of status changes for IDs.
Generates a report for the defined target IDs and the time period defined
by the options of the historical status of the defined target ID showing
just the status changes.
Each line in the report is a status change.
Options:
-t, --targetIds TEXT Get results only for the defined targetIDs. If
the value is "?" a select list is provided to
the console to select the WBEM server targetids
from the targets table.
-s, --startdate DATE Start date for ping records included. Format is
dd/mm/yy where dd and mm are zero padded (ex.
01) and year is without century (ex. 17).
Default:oldest record
-e, --enddate DATE End date for ping records included. Format is
dd/mm/yy where dd and dm are zero padded (ex.
01) and year is without century (ex. 17).
Default:current datetime
-n, --numberofdays INTEGER Alternative to enddate. Number of days to report
from startdate. "enddate" ignored if
"numberofdays" set
-h, --help Show this message and exit.
smicli history weekly –help¶
The following defines the help output for the smicli history weekly –help subcommand
Usage: smicli history weekly [COMMAND-OPTIONS]
Generate weekly report from ping history.
Generates the report normally emailed for the smi lab status.
This subcommand generates a report on the status of each target id in the
targets table filtered by the --date parameter. It generates a summary of
the status for the current day, for the previous week and for the total
program.
The --date is optional. Normally the report is generated for the week
ending at the time the report is generated but the --date pararameter
allows the report to be generated for previous dates.
This report includes percentage OK for each target for today, this week,
and the program and overall information on the target (company, product,
SMIversion, contacts.)
The error codes are documented in the online documentation.
Options:
-d, --date DATE Optional date to be used as basis for report in form
dd/mm/yy. Default is today. This option allows reports to
be generated for previous periods.
-o, --order TEXT Sort order of the columns for the report output. This can
be any of the column headers (case independent). Default:
Company
-d, --disabled Show disabled targets. Otherwise only targets that are set
Enabled in the database are shown.(Default:Do not show
disabled targets).
-h, --help Show this message and exit.
smicli notifications –help¶
The following defines the help output for the smicli notifications –help subcommand
Usage: smicli notifications [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group for notifications table.
Includes commands to list and modify the Companies table in the database.
This is largely an inernal table that keeps track of notifications make
There is nothing to be done except to list notifications made and to clean
up the table.
Options:
-h, --help Show this message and exit.
Commands:
delete Delete records from notifications file.
list List Notifications in the database.
stats Get stats on pings in database.
smicli notifications delete –help¶
The following defines the help output for the smicli notifications delete –help subcommand
Usage: smicli notifications delete [COMMAND-OPTIONS]
Delete records from notifications file.
Delete records from the notifications file based on start date and end
date options and the optional list of target ids provided.
ex. smicli notifications delete --startdate 09/09/17 --endate 09/10/17
Because this could accidently delete all history records, this command
specifically requires that the user provide both the start date and either
the enddate or number of days. It makes no assumptions about dates.
It also requires verification before deleting any records.
Options:
-s, --startdate DATE Start date for pings to be deleted. Format is
dd/mm/yy [required]
-e, --enddate DATE End date for pings to be deleted. Format is
dd/mm/yy [required]
-n, --numberofdays INTEGER Alternative to enddate. Number of days to report
from startdate. "enddate" ignored if
"numberofdays" set
-t, --TargetID INTEGER Optional targetID. If included, delete ping
records only for the defined targetID. Otherwise
all ping records in the defined time period are
deleted.
-h, --help Show this message and exit.
smicli notifications list –help¶
The following defines the help output for the smicli notifications list –help subcommand
Usage: smicli notifications list [COMMAND-OPTIONS]
List Notifications in the database.
List notifications for a date range and optionally a company or user.
Options:
-i, --targetIDs INTEGER Optional list of ids. If not supplied, all ids
are used.
-s, --startdate DATE Start date for ping records included. Format is
dd/mm/yy where dd and mm are zero padded (ex.
01) and year is without century (ex. 17).
Default is oldest record
-e, --enddate DATE End date for ping records included. Format is
dd/mm/yy where dd and dm are zero padded (ex.
01) and year is without century (ex. 17).
Default is current datetime
-n, --numberofdays INTEGER Alternative to enddate. Number of days to report
from startdate. "enddate" ignored if
"numberofdays" set
-u, --UserId INTEGER Get results only for the defined userID
-S--summary If set only a summary is generated.
-h, --help Show this message and exit.
smicli notifications stats –help¶
The following defines the help output for the smicli notifications stats –help subcommand
Usage: smicli notifications stats [COMMAND-OPTIONS]
Get stats on pings in database.
This subcommand only shows the count of records and the oldest and newest
record in the pings database
TODO we need to grow this output to more statistical information
Options:
-h, --help Show this message and exit.
smicli programs –help¶
The following defines the help output for the smicli programs –help subcommand
Usage: smicli programs [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to handle programs table.
The programs table defines programs in terms of start and end dates so
that other commands can use specific programs to manage their tables.
Normally a program is one year long and includes it start date, end date,
and a program name.
There are subcommands to create,modify, delete program entries and a list
command that shows all entries in the table.
Options:
-h, --help Show this message and exit.
Commands:
add Add new program to the database.
current Get info on current program.
delete Delete a program from the database.
list List programs in the database.
smicli programs add –help¶
The following defines the help output for the smicli programs add –help subcommand
Usage: smicli programs add [COMMAND-OPTIONS]
Add new program to the database.
Options:
-s, --startdate DATE Start date for program. Format is dd/mm/yy where dd
and mm are zero padded (ex. 01) and year is without
century (ex. 17). This option is optional and if not
supplied the day after the end of the latest program
will be selected.
-e, --enddate DATE End date for program. Format is dd/mm/yy where dd
and mm are zero padded (ex. 01) and year is without
century (ex. 17). This field is optional and if not
defined on the command line 12 montsh - 1 day after
the start date will be used as the end date.
-p, --programname TEXT Descriptive name for program [required]
-h, --help Show this message and exit.
smicli programs current –help¶
The following defines the help output for the smicli programs current –help subcommand
Usage: smicli programs current [COMMAND-OPTIONS]
Get info on current program.
Search database for current program and display info on this program
Options:
-h, --help Show this message and exit.
smicli programs delete –help¶
The following defines the help output for the smicli programs delete –help subcommand
Usage: smicli programs delete [COMMAND-OPTIONS] ProgramID
Delete a program from the database.
Delete the program defined by the command argument from the database. The
ProgramID is the database id field that is displayed with the "programs
list" command. The programId to delete can be input directly, or selected
from a list of programs by entering the character "?" generates a
selection list.
Example: smicli programs delete ?
Options:
-n, --no-verify Do not verify the deletion before deleting the program.
-h, --help Show this message and exit.
smicli programs list –help¶
The following defines the help output for the smicli programs list –help subcommand
Usage: smicli programs list [COMMAND-OPTIONS]
List programs in the database.
Options:
-h, --help Show this message and exit.
smicli provider –help¶
The following defines the help output for the smicli provider –help subcommand
Usage: smicli provider [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group for provider operations.
This group of commands provides commands to query the providers defined by
entries in the targets database. This includes subcommands like ping, get
basic info, get namespace info, get profile information. for individual
providers.
It differs from the explore group in that it provides tools to process
individual providers in the database rather than try to explore the entire
set of providers. It also allows many more operations against the
individual provider.
Options:
-h, --help Show this message and exit.
Commands:
classes Find all classes that match CLASSNAME.
info Display general info for the provider.
interop Display interop namespace for the provider.
namespaces Display public namespaces for the provider.
ping Ping the provider defined by targetid.
profiles Display registered profiles for provider.
smicli provider classes –help¶
The following defines the help output for the smicli provider classes –help subcommand
Usage: smicli provider classes [COMMAND-OPTIONS] TargetID
Find all classes that match CLASSNAME.
Find all class names in the namespace(s) of the defined
proovider(WBEMServer) that match the CLASSNAME regular expression
argument. The CLASSNAME argument may be either a complete classname or a
regular expression that can be matched to one or more classnames. To limit
the filter to a single classname, terminate the classname with $.
The TargetID defines a single provider (See targets table). It may be
picked from a list by entering "?".
The regular expression is anchored to the beginning of CLASSNAME and is
case insensitive. Thus pywbem_ returns all classes that begin with
PyWBEM_, pywbem_, etc.
TODO: Add option to limit to single namespace
Options:
-c, --classname CLASSNAME regex
Regex that filters the classnames to return
only those that match the regex. This is a
case insensitive, anchored regex. Thus,
"CIM_" returns all classnames that start
with "CIM_". To return an exact classname
append "$" to the classname
-s, --summary Return only the count of classes in the
namespace(s)
-n, --namespace <name> Namespace to use for this operation. If not
defined all namespaces are used
-h, --help Show this message and exit.
smicli provider info –help¶
The following defines the help output for the smicli provider info –help subcommand
Usage: smicli provider info [COMMAND-OPTIONS] TargetID
Display general info for the provider.
The TargetID defines a single provider (See targets table). It may be
picked from a list or by entering "?".
The company options allows searching by company name in the provider base.
Options:
-h, --help Show this message and exit.
smicli provider interop –help¶
The following defines the help output for the smicli provider interop –help subcommand
Usage: smicli provider interop [COMMAND-OPTIONS] TargetID
Display interop namespace for the provider.
The TargetID defines a single provider (See targets table). It may be
picked from a list by entering "?".
The company options allows searching by company name in the provider base.
Options:
-h, --help Show this message and exit.
smicli provider namespaces –help¶
The following defines the help output for the smicli provider namespaces –help subcommand
Usage: smicli provider namespaces [COMMAND-OPTIONS] TargetID
Display public namespaces for the provider.
The TargetID for the provider can be entered directly or by using the
interactive feature (entering "?" for the targetid to pick the TargetID
from a list.
ex. smicli provider namespaces ?
Options:
-h, --help Show this message and exit.
smicli provider ping –help¶
The following defines the help output for the smicli provider ping –help subcommand
Usage: smicli provider ping [COMMAND-OPTIONS] TargetID
Ping the provider defined by targetid.
The TargetID defines a single provider (See targets table). It may be
entered as an argument or picked from a list by entering "?" as the
TargetID argument.
The company options allows searching by company name in the provider base.
Options:
--timeout INTEGER Timeout for the ping in seconds. (Default 2).
-h, --help Show this message and exit.
smicli provider profiles –help¶
The following defines the help output for the smicli provider profiles –help subcommand
Usage: smicli provider profiles [COMMAND-OPTIONS] TargetID
Display registered profiles for provider.
The TargetID defines a single provider (See targets table). It may be
picked from a list by entering "?".
The other options allow the selection of a subset of the profiles from the
server by organization name, profile name, or profile version.
ex. smicli provider profiles 4 -o SNIA
Options:
-o, --organization TEXT Optionally specify organization for the profiles
-n, --name TEXT Optionally specify name for the profiles
-v, --version TEXT Optionally specify versionfor the profiles
-h, --help Show this message and exit.
smicli repl –help¶
The following defines the help output for the smicli repl –help subcommand
Usage: smicli repl [OPTIONS]
Enter interactive (REPL) mode (default).
This subcommand enters the interactive mode where subcommands can be
executed without exiting the progarm and loads any existing command
history file.
Options:
-h, --help Show this message and exit.
smicli sweep –help¶
The following defines the help output for the smicli sweep –help subcommand
Usage: smicli sweep [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to sweep for servers.
Sweeping for servers involves pinging in one form or another possible
ip/port combinations to find open ports.
This group sweeps servers in a defined range looking for open WBEMServers.
Options:
-h, --help Show this message and exit.
Commands:
nets Execute sweep on the ip/port combinations defined by the --subnet...
smicli sweep nets –help¶
The following defines the help output for the smicli sweep nets –help subcommand
sweep_group
Usage: smicli sweep nets [COMMAND-OPTIONS]
Execute sweep on the ip/port combinations defined by the --subnet and
--port options
Options:
-s, --subnet TEXT IP subnets to scan (ex. 10.1.132). One subnet
per option Each subnet string is itself a
definition that consists of period separated
octets that are used to create the individual
ip addresses to be tested: * Integers: Each
integer is in the range 0-255 ex.
10.1.2.9 * Octet range definition: A range
expansion is in the form: int-int which
defines the mininum and maximum values
for that octet (ex 10.1.132-134) or *
Integer lists: A range list is in the form:
int,int,int
and defines the set of values
for that octet. Missing octet definitions are
expanded to the value range defined by the min
and max octet value parameters All octets of
the ip address can use any of the 3
definitions.
Examples: 10.1.132,134 expands to
addresses in 10.1.132 and 10.1.134. where the
last octet is the range 1 to 254 [required]
-p, --port INTEGER RANGE Port(s) to test. This argument may be define
multiple ports. Ex. -p 5988 -p 5989.
Default=5989
-t, --scantype [tcp|syn|all] Set scan type: %s. Some scan types require
privilege mode. (Default: tcp.)
-m INTEGER RANGE Minimum expanded value for any octet that is
not specifically included in a net definition.
Default = 1
-M INTEGER RANGE Maximum expanded value for any octet that is
not specifically included in a net definition.
Default = 254
-D, --dryrun Display list of systems/ports to be scanned
but do not scan. This is a diagnostic tool
(Default: False.)
--no_threads Disable multithread scan. This should only be
used if there are issues with the multithread
scan. It is MUCH slower. (Default: False.)
-h, --help Show this message and exit.
smicli targets –help¶
The following defines the help output for the smicli targets –help subcommand
Usage: smicli targets [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group for managing targets data.
This command group enables operations for viewing and management of data
on the target providers as defined in a database.
The targets database defines the providers to be pinged, tested, etc.
including all information to access the provider and links to other data
such as company, etc.
Options:
-h, --help Show this message and exit.
Commands:
delete Delete a target record from the targets table.
disable Disable a provider from scanning.
fields Display field names in targets database.
get Display details of single database target.
info Show target database config information
list Display the entries in the targets database.
modify Modify fields in a target database record.
new Add a new target data base record.
smicli targets delete –help¶
The following defines the help output for the smicli targets delete –help subcommand
Usage: smicli targets delete [COMMAND-OPTIONS] TargetID
Delete a target record from the targets table.
The TargetID is a required argument and defines the database id for the
target wbem server. This argument may be entered as a single integer or by
entering the character "?" for Target ID to select the target from a list
presented.
The new target is permanently deleted from the target table in the
database.
Options:
-n, --no-verify Disable verification prompt before the delete is executed.
-h, --help Show this message and exit.
smicli targets disable –help¶
The following defines the help output for the smicli targets disable –help subcommand
Usage: smicli targets disable [COMMAND-OPTIONS] TargetID
Disable a provider from scanning. This changes the database.
The TargetID is a required argument and defines the database id for the
target wbem server. This argument may be entered as a single integer or by
entering the character "?" for Target ID to select the target from a list
presented.
Options:
-e, --enable Enable the Target if it is disabled.
-N, --no_verify Disable verification prompt before the change is executed.
-h, --help Show this message and exit.
smicli targets fields –help¶
The following defines the help output for the smicli targets fields –help subcommand
Usage: smicli targets fields [COMMAND-OPTIONS]
Display field names in targets database.
Options:
-h, --help Show this message and exit.
smicli targets get –help¶
The following defines the help output for the smicli targets get –help subcommand
Usage: smicli targets get [COMMAND-OPTIONS] TargetID
Display details of single database target.
The TargetID is a required argument and defines the database id for the
target wbem server. This argument may be entered as a single integer or by
entering the character "?" for Target ID to select the target from a list
presented.
ex. smicli target get ?
Options:
-h, --help Show this message and exit.
smicli targets info –help¶
The following defines the help output for the smicli targets info –help subcommand
Usage: smicli targets info [COMMAND-OPTIONS]
Show target database config information
Options:
-h, --help Show this message and exit.
smicli targets list –help¶
The following defines the help output for the smicli targets list –help subcommand
Usage: smicli targets list [COMMAND-OPTIONS]
Display the entries in the targets database.
Options:
-f, --fields FIELDNAME Define specific fields for output. TargetID always
included. Multiple fields can be specified by
repeating the option. (Default: predefined list of
fields).
Enter: "-f ?" to interactively select
fields for display.
Ex. "-f TargetID -f CompanyName"
-d, --disabled Show disabled targets. Otherwise only targets that
are set enabled in the database are
shown.(Default:Do not show disabled targets).
-o, --order FIELDNAME Sort by the defined field name. Names are viewed
with the targets fields subcommand or "-o ?" to
interactively select field for sort
-h, --help Show this message and exit.
smicli targets modify –help¶
The following defines the help output for the smicli targets modify –help subcommand
Usage: smicli targets modify [COMMAND-OPTIONS] TargetID
Modify fields in a target database record.
This subcommand changes the database permanently. It allows the user to
verify all changes before they are committed to the database. All changes
to the database are recorded in the audit log including both the original
and new values. Values to be changed are defined by command line options.
The TargetID is a required argument and defines the database id for the
target wbem server. This argument may be entered as a single integer or by
entering the character "?" for Target ID to select the target from a list
presented.
Not all fields are defined for modification. Today the fields of
SMIVersion, CimomVersion, NotifyUsers and Notify cannot be modified with
this subcommand.
Example: smicli targets modify ? --ipaddress 10.2.3.4 --port 5988
--protocol https
Options:
-a, --all If set, presents each field with a prompt
and requests input. Hit enter to bypass or
enter new value for each field.
--ipaddress TEXT Modify the IP address if this option is
included.
--protocol [http|https] Modify the protocol string if this option is
included.
--port TEXT Modify the port field. This should be
consistent with the protocol field.
Normally port 5988 is http protocol and 5989
is https
--principal TEXT Modify the Principal field.
--credential TEXT Modify the Credential field.
--smiversion TEXT Modify the the smiversion field.
--product TEXT Modify the the Product field.
--interopnamespace TEXT Modify the InteropNamespace field with a new
interop namespace.
--namespace TEXT Modify the namespace field with a new
namespace.
--cimonversion TEXT Modify the cimomversion field with a new
namespace.
--companyid TEXT Modify the companyID field with the correct
ID from the Company Table. Entering "?" into
this field enables the interactive display
of companies for selection of the company id
--scanenabled [Enabled|Disabled]
Modify the ScanEnabled field if this option
is included.
--notifyusers [Enabled|Disabled]
Modify the ScanEnabled field if this option
is included.
-N, --no_verify Disable verification prompt before the
change is executed.
-h, --help Show this message and exit.
smicli targets new –help¶
The following defines the help output for the smicli targets new –help subcommand
Usage: smicli targets new [COMMAND-OPTIONS]
Add a new target data base record.
This allows the user to define all of the fields in a target to add a new
target to the table.
The syntax of the fields is generally validated but please be careful
since the validation is primitive.
The new target is permanently added to the target table
Options:
--template TEXT Target record to use as input data for new target.
[required]
-h, --help Show this message and exit.
smicli users –help¶
The following defines the help output for the smicli users –help subcommand
Usage: smicli users [COMMAND-OPTIONS] COMMAND [ARGS]...
Command group to handle users table.
Includes subcommands to list entries in the database users table and to
create, modify, delete specific entries.
Options:
-h, --help Show this message and exit.
Commands:
activate Activate or deactivate multiple users.
add Add a new user in the user table.
delete Delete a user from the database.
fields Display field names in users database.
list List users in the database users table.
modify Modify fields of a user in the user database.
smicli users activate –help¶
The following defines the help output for the smicli users activate –help subcommand
Usage: smicli users activate [COMMAND-OPTIONS] UserIDs
Activate or deactivate multiple users.
This sets the users defined by the userids argument to either active or
inactive. When a user is inactive they are no longer shown in tables that
involve user information such as the weekly report.
The users to be activated or deactivated may be specified by a) specific
user ids, b) the interactive mode option, or c) using '?' as the user id
argument which also initiates the interactive mode options.
Each user selected activated separately and users already in the target
state are bypassed. If the --no-verify option is not set each user to be
changed causes a verification request before the change.
Examples: smicli users activate ? --inactive # list all users for
select and # deactivate the
selected users smicli user activate ? --active -c ? # first creates
selection list # to select
company. Then # creates select
list for that # company and
activates the # selected users.
Options:
--active / --inactive Set the active/inactive state in the database for
this user. Default is to attempt set user to
inactive.
-n, --no-verify Disable verification prompt before the operation
is executed.
-c, --companyid COMPANYID Limit the list of users from which to select by
the companyid provided
-h, --help Show this message and exit.
smicli users add –help¶
The following defines the help output for the smicli users add –help subcommand
Usage: smicli users add [COMMAND-OPTIONS]
Add a new user in the user table.
Creates a new user with the defined parameters for the company defined by
the required parameter companyID.
Verification that the operation is correct is requested before the change
is executed unless the `--no-verify' parameter is set.
Examples:
smicli users add -f John -l Malia -e jm@blah.com -c ?
Defines a new user with name and email defined after using select list
to get companyID of the user. A prompt for verification is presented
before the database is changed.
Options:
-f, --firstname TEXT User first name. [required]
-l, --lastname TEXT User last name [required]
-e, --email TEXT User email address. [required]
-c, --companyID TEXT CompanyID for the company attached to this user. Enter
? to use selection list to get company id [required]
--inactive Set the active/inactive state in the database for this
user. An inactive user is ignored. Default is active
--disable Disable notifications in the database for this user.
Default is enabled
-N, --no_verify Disable verification prompt before the change is
executed.
-h, --help Show this message and exit.
smicli users delete –help¶
The following defines the help output for the smicli users delete –help subcommand
Usage: smicli users delete [COMMAND-OPTIONS] UserID
Delete a user from the database.
Delete the user defined by the subcommand argument from the database.
The user to be deleted may be specified by a) specific user id, b) using
'?' as the user id argument which also initiates the interactive mode
options
Examples:
smicli delete 85 smicli delete ?
Options:
-n, --no-verify Disable verification prompt before the delete is executed.
-h, --help Show this message and exit.
smicli users fields –help¶
The following defines the help output for the smicli users fields –help subcommand
Usage: smicli users fields [COMMAND-OPTIONS]
Display field names in users database.
Example:
smicli users list fields
Options:
-h, --help Show this message and exit.
smicli users list –help¶
The following defines the help output for the smicli users list –help subcommand
Usage: smicli users list [COMMAND-OPTIONS]
List users in the database users table.
Lists the information on users in the users table in a table format, one
user per row. Options allow selecting specific fields of the table (the
fields in the table can be viewed with the fields subcommand) and ordering
the ouput with a field name. Unless the --disabled option is set, only
active users are shown in the output.
The --companyid option allows selecting only users for a particular
company for the list.
The default field list is:
UserID, FirstName, Lastname, Email, CompanyName, Active, Notify
Examples:
smicli users list # default list of all users
smicli users list -c ? # Presents a list of companies for user to
# select a company and then lists users for #
that company
smicli users list -f Email -o Email # list with UserId and Email
fields # in output table.
Options:
-f, --fields FIELDNAME Define specific fields for output. UserID always
included. Multiple fields can be specified by
repeating the option. (Default: predefined list
of fields).
Enter: "-f ?" to interactively select
fields for display.
Ex. "-f UserID -f
CompanyName"
-d, --disabled Include disabled users. Otherwise only users that
are set enabled in the database are
shown.(Default:Do not show disabled users).
-o, --order FIELDNAME Sort by the defined field name. Names are viewed
with the targets fields subcommand or "-o ?" to
interactively select field for sort
-c, --companyid COMPANYID Filter the list to just users with the defined
companyID. This field may be selected
interactively by entering "?".
-h, --help Show this message and exit.
smicli users modify –help¶
The following defines the help output for the smicli users modify –help subcommand
Usage: smicli users modify [COMMAND-OPTIONS] UserID
Modify fields of a user in the user database.
This allows modifications of the fields for a particular specified by the
user id on input.
The user to be modified may be specified by a) specific user id, b) the
interactive mode option, or c) using '?' as the user id argument which
also initiates the interactive mode options
ex. smicli users modify 9 -n fred # changes the first name of the user
with user id 9.
Options:
-f, --firstname TEXT User first name.
-l, --lastname TEXT User last name
-e, --email TEXT User email address.
-c, --CompanyID INTEGER CompanyID for the company attached to this user
--no_notifications Disable the notify state in the database for this
user if this flag set.
-n, --no-verify Disable verification prompt before the change is
executed.
-h, --help Show this message and exit.
Tools¶
Overview¶
The basic functionality for smipyping is contained in the single smicli executable. However, we have included a number of other tools to help with specific tasks.
Email tool¶
The tools directory contains a separate Python tool to send email (pysendmail) which acts similar to the system sendmail in that it can be used to send email to outside SMTP servers. This is a command line tool and the usage documentation can be viewed by executing pysendmail -h.
By using this tool, avoids the effort to activate tools like sendmail for the environment containing smipyping.
Generally it allows the user to send mail to external SMTP servers that contain messages base on text or html files. It is used by smipyping to send reports for activities like the weekly report, etc. that are driven by schedulers like crontab.
The input parameters include:
- The to address
- The From Addresses
- The Subject Line
- Optional CC addresses
- The file containing the text or html content.
6. The name of the email configuration file. The default is ‘email.ini’ in the execution directory.
A separate config file must be defined to use this tool to define the characteristics of the SMTP server to be used. This allows defining the SMTP server, user, passwords, without having this information committed to the smipping source code.
The configuration file is a standard ini format that contains name/value pairs for the required fields. The following is an example of this file:
# Configuration file for pysendmail tool of smipyping. This keeps all of
# issues concerning email security out of the software release. This file
# should NOT be part of the collection in github to avoid making the
# password public.
[email]
#
# A default email user name that is used if the from address is not
# provided on the command line. This line is optional.
#
DefaultFromAddress=<single from address>
#
# email user account name. This line is required.
#
user=<The email user name>
#
# email user account password. This line is required.
#
password=<password>
# email server NOTE: For the moment, pysendmail assumes that tls is enabled
# for the server. This line is optional. The default is
# `smtp.gmail.com:587`.
SmtpServer=smtp.gmail.com:587
This tool has been tested specifically with gmail as the SMTP server and using tls.
To set it up for gmail with an installed smipyping:
Get a gmail account so that the user name and password are available.
Set up the email.ini configuration file.
Test by entering the following:
pysendmail -t <to email> -f <from email> -s “subject test” -F <file to sent> -v
This will try to create the email and send it. the -v option will show the interaction between pysendmail and the SMTP server.
Database tools¶
We are providing a number of command line tools to support viewing, dumping and installing the database.
Development¶
This section only needs to be read by developers of the smipyping package. People that want to make a fix or develop some extension, and people that want to test the project are also considered developers for the purpose of this section.
Setting up the development environment¶
The development environment is easy to set up.
Besides having a supported operating system with a supported Python version (see Supported environments), it is recommended that you set up a virtual Python environment.
Then, with a virtual Python environment active, clone the Git repo of this
project and prepare the development environment with make develop
:
$ git clone git@github.com:kschopmeyer/smipyping.git
$ cd smipyping
$ make develop
This will install all prerequisites the package needs to run, as well as all prerequisites that you need for development.
Generally, this project uses Make to do things in the currently active
Python environment. The command make help
(or just make
) displays a
list of valid Make targets and a short description of what each target does.
Building the documentation¶
The ReadTheDocs (RTD) site is used to publish the documentation for the smipyping package at http://smipyping.readthedocs.io/
This page automatically gets updated whenever the master
branch of the
Git repo for this package changes.
In order to build the documentation locally from the Git work directory, issue:
$ make builddoc
The top-level document to open with a web browser will be
build_doc/html/docs/index.html
.
Testing¶
To run unit tests in the currently active Python environment, issue one of
these example variants of make test
:
$ make test # Run all unit tests
$ PYTHONPATH=. py.test tests/<testname>.py -s # Run only this test source file
Invoke py.test --help
for details on the expression syntax of its -k
option.
To run the unit tests and some more commands that verify the project is in good shape in all supported Python environments, use Tox:
$ tox # Run all tests on all supported Python versions
$ tox -e py27 # Run all tests on Python 2.7
Contributing¶
Third party contributions to this project are welcome!
In order to contribute, create a Git pull request, considering this:
- Test is required.
- Each commit should only contain one “logical” change.
- A “logical” change should be put into one commit, and not split over multiple commits.
- Large new features should be split into stages.
- The commit message should not only summarize what you have done, but explain why the change is useful.
- The commit message must follow the format explained below.
What comprises a “logical” change is subject to sound judgement. Sometimes, it makes sense to produce a set of commits for a feature (even if not large). For example, a first commit may introduce a (presumably) compatible API change without exploitation of that feature. With only this commit applied, it should be demonstrable that everything is still working as before. The next commit may be the exploitation of the feature in other components.
For further discussion of good and bad practices regarding commits, see:
Releasing a version of this package¶
This section shows the steps for releasing a version of smipyping.
Note that a release may be either local only or to PyPI. We will announce when we do a release to PyPI. Locally a release involves creating a branch that represents the release and tagging both that branch and the master branch with versions. I PyPI release involves then uploading the released version of the package to PyPI
Switch to your work directory of the smipyping Git repo (this is where
the Makefile
is), and perform the following steps in that directory:
Set a shell variable for the version to be released, e.g.:
MNU='0.6.0'
Verify that your working directory is in a Git-wise clean state:
git status
Check out the
master
branch, and update it from upstream:git checkout master git pull
Create a topic branch for the release:
git checkout -b release-$MNU git branch --set-upstream-to origin/release-$MNU release-$MNU
Edit the change log (
docs/changes.rst
) and perform the following changes in the top-most section (that is the section for the version to be released):If needed, change the version in the section heading to the version to be released, e.g.:
Version 0.6.0 -------------
Change the release date to today’s date, e.g.:
Released: 2017-03-16
Make sure that the change log entries reflect all changes since the previous version, and make sure they are relevant for and understandable by users.
In the “Known issues” list item, remove the link to the issue tracker and add any known issues you want users to know about. Just linking to the issue tracker quickly becomes incorrect for released versions:
**Known issues:** * ....
Remove all empty list items in the change log section for this release.
Commit your changes and push them upstream:
git add docs/changes.rst git commit -sm "Updated change log for $MNU release." git push
On GitHub, create a pull request for branch release-$MNU.
Perform a complete test:
tox
This should not fail because the same tests have already been run in the Travis CI. However, run it for additional safety before the release.
If this test fails, fix any issues until the test succeeds. Commit the changes and push them upstream:
git add <changed-files> git commit -sm "<change description with details>" git push
Wait for the automatic tests to show success for this change.
Once the CI tests on GitHub are complete, merge the pull request.
Update your local
master
branch:git checkout master git pull
Tag the
master
branch with the release label and push the tag upstream:git tag $MNU git push --tags
On GitHub, edit the new tag, and create a release description on it. This will cause it to appear in the Release tab.
You can see the tags in GitHub via Code -> Releases -> Tags.
Upload the package to PyPI:
make upload
This will show the package version and will ask for confirmation.
Attention!! This only works once for each version. You cannot release the same version twice to PyPI.
Verify that the released version is shown on PyPI:
Verify that RTD shows the released version as its stable version:
https://smipyping.readthedocs.io/en/stable/intro.html#versioning
Note: RTD builds the documentation automatically, but it may take a few minutes to do so.
On GitHub, close milestone M.N.U.
Starting a new release¶
This section shows the steps for starting development of a new version.
These steps may be performed right after the steps for releasing to PyPI, or independently.
This description works for releases that are direct successors of the previous release. It does not cover starting a new version that is a fix release to a version that was released earlier.
Switch to your work directory of the smipyping Git repo (this is where
the Makefile
is), and perform the following steps in that directory:
Set a shell variable for the new version to be started:
MNU='0.7.0'
Verify that your working directory is in a git-wise clean state:
git status
Check out the
master
branch, and update it from upstream:git checkout master git pull
Create a topic branch for the release:
git checkout -b start-$MNU git branch --set-upstream-to origin/start-$MNU start-$MNU
Edit the change log (
docs/changes.rst
) and insert the following section before the top-most section (which is the section about the latest released version):Version 0.7.0 ------------- Released: not yet **Incompatible changes:** **Deprecations:** **Bug fixes:** **Enhancements:** **Known issues:** * See `list of open issues`_. .. _`list of open issues`: https://github.com/kschopmeyer/smipyping/issues
Commit your changes and push them upstream:
git add docs/changes.rst git commit -sm "Started $MNU release." git push
On GitHub, create a pull request for branch start-$MNU.
On GitHub, create a new milestone for development of the next release, e.g. M.N.U.
You can create a milestone in GitHub via Issues -> Milestones -> New Milestone.
On GitHub, go through all open issues and pull requests that still have milestones for previous releases set, and either set them to the new milestone, or to have no milestone.
Once the CI tests on GitHub are complete, merge the pull request.
Update your local
master
branch:git checkout master git pull
Appendix¶
This section contains information that is referenced from other sections, and that does not really need to be read in sequence.
WBEM server error codes¶
when tests like smicli cimping are executed, smicli collects any errors returned from the servers. If the tests requests that the data update the database, (-s option) these error codes are set into the entries of the history database.
The possible errors are:
- OK - Server response good, no error.
- WBEMError(1) - WBEM Server returned a DMTF define CIMError code.
- PyWBEMError(2) - pywbem generated an exception for the request. Since pywbem generates a number of different error exceptions (XML errors, etc) the specific error text is included with this error
- GeneralError(3) - pywbem generated a general error (obsolete)
- TimeoutError(4) - pywbem generated a timeout error waiting for the request response. The timeout is defined as part of the connection setup and most in smicli defaults to 10 seconds
- ConnectionError(5) - pywbem generated a connection exception, typically this is a failure to connect to the server or an ssl error.
- PingFail(6) - If smicli was requested to do a ping (os level ping program) and that failed, this error is generated. It means that the ping of the ip address failed and usually means that the defined server does not exist.
- Disabled(7) - If the command options specified that disable target servers be included, those servers are marked with this error code.
Special type names¶
This documentation uses a few special terms to refer to Python types:
- string
- a unicode string or a byte string
- unicode string
- a Unicode string type (
unicode
in Python 2, andstr
in Python 3) - byte string
- a byte string type (
str
in Python 2, andbytes
in Python 3). Unless otherwise indicated, byte strings in pywbem are always UTF-8 encoded. - number
- one of the number types
int
,long
(Python 2 only), orfloat
. - integer
- one of the integer types
int
orlong
(Python 2 only). - callable
- a type for callable objects (e.g. a function, calling a class returns a
new instance, instances are callable if they have a
__call__()
method). - DeprecationWarning
- a standard Python warning that indicates a deprecated functionality.
- Element
- class
xml.dom.minidom.Element
. Its methods are described in section Element Objects of modulexml.dom
, with minidom specifics described in section DOM Objects of modulexml.dom.minidom
. - CIM data type
- one of the types listed in CIM data types.
- CIM object
- one of the types listed in CIM objects.
Troubleshooting¶
Here are some trouble shooting hints for the installation of smipyping and pywbem.
Swig error ‘Unrecognized option -builtin’ during M2Crypto install¶
On Python 2.x, pywbem uses the M2Crypto package from PyPI and installs it during its own installation. The M2Crypto package invokes the Swig tool during its installation. If the version of Swig is too old, the invocation of Swig fails with:
swig error : Unrecognized option -builtin
The solution is to use Swig v2.0 or higher.
The pywbem setup script checks the version of Swig and installs a newer version of Swig, or if not available builds Swig from its sources (while automatically installing any further OS-level prerequisites needed for building Swig).
gcc does not find Python.h while installing M2Crypto¶
On Python 2.x, pywbem uses the M2Crypto package from PyPI and installs it during its own installation. The M2Crypto package invokes the Swig tool during its installation. Swig invokes the gcc compiler on source code it produces. That source code needs the Python.h header file.
If the invocation of gcc fails with:
SWIG/_m2crypto_wrap.c:127:20: fatal error: Python.h: No such file or directory
then you do not have the Python.h header file available.
The installation of pywbem with OS-level prereqs (see Installation) installs the necessary Python SDK package for C/C++ (or displays its package name). On RHEL, the missing package is python-dev.
Glossary¶
- dynamic indication filter
- dynamic filter
- An indication filter in a WBEM server whose life cycle is managed by a client. See DSP1054 for an authoritative definition and for details.
- static indication filter
- static filter
- An indication filter in a WBEM server that pre-exists and whose life cycle cannot be managed by a client. See DSP1054 for an authoritative definition and for details.
References¶
- DSP0004
- DMTF DSP0004, CIM Infrastructure, Version 2.8
- DSP0200
- DMTF DSP0200, CIM Operations over HTTP, Version 1.4
- DSP0201
- DMTF DSP0201, Representation of CIM in XML, Version 2.4
- DSP0207
- DMTF DSP0207, WBEM URI Mapping, Version 1.0
- DSP0212
- DMTF DSP0212, Filter Query Language, Version 1.0.1
- DSP1033
- DMTF DSP1033, Profile Registration Profile, Version 1.1
- DSP1054
- DMTF DSP1054, Indications Profile, Version 1.2
- X.509
- ITU-T X.509, Information technology - Open Systems Interconnection - The Directory: Public-key and attribute certificate frameworks
- RFC2616
- IETF RFC2616, Hypertext Transfer Protocol – HTTP/1.1, June 1999
- RFC2617
- IETF RFC2617, HTTP Authentication: Basic and Digest Access Authentication, June 1999
- RFC3986
- IETF RFC3986, Uniform Resource Identifier (URI): Generic Syntax, January 2005
- RFC6874
- IETF RFC6874, Representing IPv6 Zone Identifiers in Address Literals and Uniform Resource Identifiers, February 2013
- WBEM Standards
- DMTF WBEM Standards
Change log¶
This version of the documentation is development version 0.6.1.dev281 and contains the master branch up to this commit:
Merge pull request #86 from KSchopmeyer/fix-version by Karl Schopmeyer at 2020-03-04 19:30:58
fixes issue #84 Add pywbem version to –version display
smipyping v0.6.0¶
Released: 2017-03-16
This is the first public version of this code. As such, the following categories do not apply.
Deprecations¶
Known Issues¶
- sqllite is not really tested at this point. There are issues between the mysql database and sqllite in converting the database.
- Documentation concerning setup and use of the databases is incomplete.
- The csv database was removed from this repository and will be supplied separately because of security issues concerning information about the equipment in the center.