Fixes an issue where custom OIDs would clear out san extensions

This commit is contained in:
kevgliss 2016-04-07 10:29:08 -07:00
parent 9a8e1534c0
commit c2387dc120
3 changed files with 14 additions and 6 deletions

View File

@ -1,5 +1,5 @@
""" """
.. module: elb .. module: lemur.plugins.lemur_aws.elb
:synopsis: Module contains some often used and helpful classes that :synopsis: Module contains some often used and helpful classes that
are used to deal with ELBs are used to deal with ELBs
@ -28,7 +28,6 @@ def is_valid(listener_tuple):
:param listener_tuple: :param listener_tuple:
""" """
current_app.logger.debug(listener_tuple) current_app.logger.debug(listener_tuple)
lb_port, i_port, lb_protocol, arn = listener_tuple lb_port, i_port, lb_protocol, arn = listener_tuple
current_app.logger.debug(lb_protocol) current_app.logger.debug(lb_protocol)

View File

@ -29,7 +29,11 @@ angular.module('lemur')
this.extensions.subAltNames.names.splice(index, 1); this.extensions.subAltNames.names.splice(index, 1);
}, },
attachCustom: function () { attachCustom: function () {
if (this.extensions === undefined || this.extensions.custom === undefined) { if (this.extensions === undefined) {
this.extensions = {};
}
if (this.extensions.custom === undefined) {
this.extensions = {'custom': []}; this.extensions = {'custom': []};
} }
@ -80,6 +84,7 @@ angular.module('lemur')
AuthorityService.create = function (authority) { AuthorityService.create = function (authority) {
authority.attachSubAltName(); authority.attachSubAltName();
authority.attachCustom();
return AuthorityApi.post(authority); return AuthorityApi.post(authority);
}; };

View File

@ -23,7 +23,7 @@ angular.module('lemur')
if (angular.isString(this.subAltValue) && angular.isString(this.subAltType)) { if (angular.isString(this.subAltValue) && angular.isString(this.subAltType)) {
this.extensions.subAltNames.names.push({'nameType': this.subAltType, 'value': this.subAltValue}); this.extensions.subAltNames.names.push({'nameType': this.subAltType, 'value': this.subAltValue});
this.findDuplicates(); //this.findDuplicates();
} }
this.subAltType = null; this.subAltType = null;
@ -31,10 +31,14 @@ angular.module('lemur')
}, },
removeSubAltName: function (index) { removeSubAltName: function (index) {
this.extensions.subAltNames.names.splice(index, 1); this.extensions.subAltNames.names.splice(index, 1);
this.findDuplicates(); //this.findDuplicates();
}, },
attachCustom: function () { attachCustom: function () {
if (this.extensions === undefined || this.extensions.custom === undefined) { if (this.extensions === undefined) {
this.extensions = {};
}
if (this.extensions.custom === undefined) {
this.extensions = {'custom': []}; this.extensions = {'custom': []};
} }