In [1]:
from apman import packagemanager as pm
import logging
In [2]:
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
Show an example apman config file, and script
In [3]:
package_config_path = '../tests/test_configs/error/config'
In [4]:
with open(package_config_path, 'r') as fin:
print fin.read()
In [5]:
package = pm.PackageManager('../tests/test_configs/error/config')
In [6]:
package.run_package()
In [7]:
summary, detail = package.get_notification_text()
In [8]:
print(summary)
In [9]:
print(detail)
In [10]:
package.send_notification_email()