Skip to content

Commit

Permalink
Updated unit test and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevel committed Jun 29, 2018
1 parent 02f646d commit fa088bc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions doc/manpages/src/katprep_maintenance.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ This utility supports the following commands
- **verify** - Verifying status (checking snapshots and downtime)
- **cleanup** - Cleaning-up (removing downtimes and snapshots)

**IMPORTANT NOTE**:
For rebooting VMs after system maintenance, at least Foreman 1.15.x or Red Hat Satellite 6.3 is required.

FILES
=====

Expand Down
2 changes: 2 additions & 0 deletions doc/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Several errata will be installed on the systems. Now, go ahead and omit the simu

$ katprep_maintenance -C mycontainer.auth -S foreman.localdomain.loc errata-snapshot-*.json -r execute

.. note:: For rebooting VMs after system maintenance, at least Foreman 1.15.x or Red Hat Satellite 6.3 is required.

Once the systems have been patched (*and maybe also rebooted*), it's time to check whether the monitoring status is fine, again::

$ katprep_maintenance -C mycontainer.auth -S foreman.localdomian.loc errata-snapshot-*.json verify
Expand Down
3 changes: 3 additions & 0 deletions doc/source/man/katprep_maintenance.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ This utility supports the following commands
- **verify** - Verifying status (checking snapshots and downtime)
- **cleanup** - Cleaning-up (removing downtimes and snapshots)

**IMPORTANT NOTE**: For rebooting VMs after system maintenance, at least
Foreman 1.15.x or Red Hat Satellite 6.3 is required.

FILES
=====

Expand Down
13 changes: 10 additions & 3 deletions tests/PyvmomiClientTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ def test_valid_login(self):
Ensure exceptions on valid logins
"""
#dummy call
#TODO: other call?
self.pyvmomi_client.get_vm_ips()
try:
result = self.pyvmomi_client.has_snapshot(
self.config["valid_objects"]["vm"],
self.dummy_snapshot
)
self.assertTrue(
result in [True, False]
)
except EmptySetException:
pass

def test_invalid_login(self):
"""
Expand All @@ -99,7 +107,6 @@ def test_invalid_login(self):
"giertz", "paulapinkepank"
)
#dummy call
#TODO. other call?
api_dummy.get_vm_ips()


Expand Down

0 comments on commit fa088bc

Please sign in to comment.