diff --git a/nova/network/quantum2/aiclib_connection.py b/nova/network/quantum2/aiclib_connection.py index 6a9b962cc..d268b59d6 100644 --- a/nova/network/quantum2/aiclib_connection.py +++ b/nova/network/quantum2/aiclib_connection.py @@ -78,7 +78,7 @@ def create_securityprofile_from_template(self, tenant_id, def get_securityprofile(self, tenant_id=None, securityprofile_id=None): errormsg = 'Either tenant_id or securityprofile_id is required' - if tenant_id is None or securityprofile_id is None: + if tenant_id is None and securityprofile_id is None: raise TypeError(errormsg) if securityprofile_id is not None: