diff --git a/docs/quickstart/index.rst b/docs/quickstart/index.rst index ac9631e3..95bd438d 100644 --- a/docs/quickstart/index.rst +++ b/docs/quickstart/index.rst @@ -56,23 +56,6 @@ And optionally if your database is going to be on the same host as the webserver $ sudo apt-get install postgres -Installing Lemur ----------------- - -Once you've got the environment setup, you can install Lemur and all its dependencies with -the same command you used to grab virtualenv:: - - pip install -U lemur - -Once everything is installed, you should be able to execute the Lemur CLI, via ``lemur``, and get something -like the following: - -.. code-block:: bash - - $ lemur - usage: lemur [--config=/path/to/settings.py] [command] [options] - - Installing from Source ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/lemur/certificates/service.py b/lemur/certificates/service.py index 081ea733..9e5db6ad 100644 --- a/lemur/certificates/service.py +++ b/lemur/certificates/service.py @@ -232,7 +232,7 @@ def create(**kwargs): database.update_list(cert, 'notifications', Notification, kwargs.get('notifications')) # create default notifications for this certificate if none are provided - notifications = [] + notifications = cert.notifications if not kwargs.get('notifications'): notification_name = "DEFAULT_{0}".format(cert.owner.split('@')[0].upper()) notifications += notification_service.create_default_expiration_notifications(notification_name, [cert.owner]) diff --git a/lemur/certificates/views.py b/lemur/certificates/views.py index 112c86ad..bd267cdc 100644 --- a/lemur/certificates/views.py +++ b/lemur/certificates/views.py @@ -208,6 +208,46 @@ class CertificatesList(AuthenticatedResource): "notAfter": "2015-06-17T15:21:08", "description": "dsfdsf" }, + "notifications": [ + { + "description": "Default 30 day expiration notification", + "notificationOptions": [ + { + "name": "interval", + "required": true, + "value": 30, + "helpMessage": "Number of days to be alert before expiration.", + "validation": "^\\d+$", + "type": "int" + }, + { + "available": [ + "days", + "weeks", + "months" + ], + "name": "unit", + "required": true, + "value": "days", + "helpMessage": "Interval unit", + "validation": "", + "type": "select" + }, + { + "name": "recipients", + "required": true, + "value": "bob@example.com", + "helpMessage": "Comma delimited list of email addresses", + "validation": "^([\\w+-.%]+@[\\w-.]+\\.[A-Za-z]{2,4},?)+$", + "type": "str" + } + ], + "label": "DEFAULT_KGLISSON_30_DAY", + "pluginName": "email-notification", + "active": true, + "id": 7 + } + ], "extensions": { "basicConstraints": {}, "keyUsage": {