Skip to content

Commit

Permalink
Renamed default connections file to .pywbemcli_connections.yaml
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Aug 12, 2020
1 parent 1d9c615 commit d3de926
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ This documentation uses a few special terms to refer to Python types:
This allows connection definitions to be persisted and referenced by name
in pywbemcli commands, via the :ref:`--name general option`.

By default, the connections file is ``pywbemcli_connection_definitions.yaml``
By default, the connections file is ``.pywbemcli_connections.yaml``
in the user's home directory. The user's home directory depends on the
operating system used. It is determined with ``os.path.expanduser("~")``,
which works on all operating systems including Windows.
Expand Down
5 changes: 5 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ Released: not yet
* Resolved remaining Pylint issues and enforced clean pylint checks.
(See issue #668)

* Renamed the default connections file in the user's home directory from
`pywbemcli_connection_definitions.yaml` to `.pywbemcli_connections.yaml`,
because it is really an internal file not meant for being edited.
(See issue #716)

**Known issues:**

* See `list of open issues`_.
Expand Down
10 changes: 5 additions & 5 deletions docs/pywbemcli/cmdshelp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ Help text for ``pywbemcli``:
Enable deprecation warnings. Default: EnvVar PYWBEMCLI_DEPRECATION_WARNINGS, or true.
-C, --connections-file FILE PATH
Path name of the connections file to be used. Default: EnvVar
PYWBEMCLI_CONNECTIONS_FILE, or "pywbemcli_connection_definitions.yaml" in the user's
home directory (as determined using Python's os.path.expanduser("~"). See there for
PYWBEMCLI_CONNECTIONS_FILE, or ".pywbemcli_connections.yaml" in the user's home
directory (as determined using Python's os.path.expanduser("~"). See there for
details, particularly for Windows).

--pdb Pause execution in the built-in pdb debugger just before executing the command within
Expand Down Expand Up @@ -622,9 +622,9 @@ Help text for ``pywbemcli connection`` (see :ref:`connection command group`):
general option.

The connection definitions are stored in a connections file. By default, the connections file is
'pywbemcli_connection_definitions.yaml' in the user's home directory. The location of the user's home directory
depends on the operating system used. It is determined with Python's 'os.path.expanduser("~")', which works on all
operating systems including Windows. The default path name of the connections file can be overwritten using the
'.pywbemcli_connections.yaml' in the user's home directory. The location of the user's home directory depends on the
operating system used. It is determined with Python's 'os.path.expanduser("~")', which works on all operating
systems including Windows. The default path name of the connections file can be overwritten using the
'PYWBEMCLI_CONNECTIONS_FILE' environment variable, or with the '--connections-file' general option.

In addition to the command-specific options shown in this help text, the general options (see 'pywbemcli --help')
Expand Down
2 changes: 1 addition & 1 deletion docs/pywbemcli/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ current connections file.
pywbemcli> --server http://blahblah connection list
WBEM server connections(brief): (#: default, *: current)
file: /home/johndoe/pywbemcli_connection_definitions.yaml
file: /home/johndoe/.pywbemcli_connections.yaml
+--------------+------------------+----------------------------------------+
| name | server | mock-server |
|--------------+------------------+----------------------------------------|
Expand Down
6 changes: 3 additions & 3 deletions docs/pywbemcli/generaloptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ a path name for the :term:`connections file`.

By default, the path name of the connections file is the value of the
``PYWBEMCLI_CONNECTIONS_FILE`` environment variable or if not set, the file
``pywbemcli_connection_definitions.yaml`` in the user's home directory.
``.pywbemcli_connections.yaml`` in the user's home directory.
The user's home directory depends on the operating system used and is
determined with ``os.path.expanduser("~")``, which works on all operating
systems including Windows. See :func:`~py3:os.path.expanduser` for details.
Expand Down Expand Up @@ -1352,8 +1352,8 @@ Pywbemcli persisted connection definitions

Pywbemcli can manage persisted connection definitions via the
:ref:`Connection command group`. These connection definitions are persisted in
a :term:`connections file` named ``pywbemcli_connection_definitions.yaml`` in
the current directory. A connection definition has a name
a :term:`connections file` named ``.pywbemcli_connections.yaml`` in
the user's home directory. A connection definition has a name
and defines all parameters necessary to connect to a WBEM server. Once defined
these connection definitions can be used with the :ref:`--name general option`
or in the interactive mode by defining a current connection with the
Expand Down
2 changes: 1 addition & 1 deletion pywbemtools/pywbemcli/_cmd_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def connection_group():
'--name' general option.
The connection definitions are stored in a connections file. By default,
the connections file is 'pywbemcli_connection_definitions.yaml' in the
the connections file is '.pywbemcli_connections.yaml' in the
user's home directory. The location of the user's home directory depends on
the operating system used. It is determined with Python's
'os.path.expanduser("~")', which works on all operating systems including
Expand Down
2 changes: 1 addition & 1 deletion pywbemtools/pywbemcli/_connection_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# with the use of the base file name in several other .rst and .py files.

# Base file name of the connections file
CONNECTIONS_FILENAME = 'pywbemcli_connection_definitions.yaml'
CONNECTIONS_FILENAME = '.pywbemcli_connections.yaml'

# Path name of default connections file directory.
DEFAULT_CONNECTIONS_DIR = os.path.expanduser("~")
Expand Down

0 comments on commit d3de926

Please sign in to comment.