This commit is contained in:
kevgliss 2015-08-29 11:48:39 -07:00
parent 80136834b5
commit 03e2991ced
3 changed files with 16 additions and 1 deletions

View File

@ -168,6 +168,10 @@ def upload(**kwargs):
kwargs.get('intermediate_cert'),
)
# we override the generated name if one is provided
if kwargs.get('name'):
cert.name = kwargs['name']
cert.description = kwargs.get('description')
cert.owner = kwargs['owner']

View File

@ -332,7 +332,8 @@ class CertificatesUpload(AuthenticatedResource):
"intermediateCert": "---Begin Public...",
"privateKey": "---Begin Private..."
"destinations": [],
"notifications": []
"notifications": [],
"name": "cert1"
}
**Example response**:
@ -373,6 +374,7 @@ class CertificatesUpload(AuthenticatedResource):
"""
self.reqparse.add_argument('description', type=str, location='json')
self.reqparse.add_argument('owner', type=str, required=True, location='json')
self.reqparse.add_argument('name', type=str, location='json')
self.reqparse.add_argument('publicCert', type=pem_str, required=True, dest='public_cert', location='json')
self.reqparse.add_argument('destinations', type=list, default=[], dest='destinations', location='json')
self.reqparse.add_argument('notifications', type=list, default=[], dest='notifications', location='json')

View File

@ -18,6 +18,15 @@
email.</p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error': uploadForm.name.$invalid, 'has-success': !uploadForm.name.$invalid&&uploadForm.name.$dirty}">
<label class="control-label col-sm-2" tooltip="If no name is provided, Lemur will generate a name for you">
Custom Name <span class="glyphicon glyphicon-question-sign"></span>
</label>
<div class="col-sm-10">
<input name="name" ng-model="certificate.name" placeholder="example.netflix.net-SymantecCorporation-20150828-20160830" class="form-control"/>
</div>
</div>
<div class="form-group"
ng-class="{'has-error': uploadForm.description.$invalid, 'has-success': !uploadForm.$invalid&&uploadForm.description.$dirty}">
<label class="control-label col-sm-2">