[AIM NFV] Limit the number of PPG per PC to 3
PPG: Port Pair Group PC: Port Chain We limit the number of services in a chain to three as suggested by the ACI guidelines Change-Id: Ibf6cc78a1f0363eb45767a594318e28edd0235ab
This commit is contained in:
@@ -112,3 +112,7 @@ class ConflictingNetworksDetectedInPortChain(exceptions.BadRequest):
|
||||
class DefaultExternalNetworkNotFound(exceptions.NotFound):
|
||||
message = _("Default External Network not found for SVI network "
|
||||
"%(id)s.")
|
||||
|
||||
|
||||
class TooManyPPGsPerChainError(exceptions.BadRequest):
|
||||
message = _("The max number of PPGs per chain supported is %(maxn)s.")
|
||||
|
||||
@@ -42,6 +42,7 @@ FLOWC_DST = 'dst'
|
||||
LOG = logging.getLogger(__name__)
|
||||
PHYSDOM_TYPE = 'PhysDom'
|
||||
SUPPORTED_DOM_TYPES = [PHYSDOM_TYPE]
|
||||
MAX_PPGS_PER_CHAIN = 3
|
||||
|
||||
|
||||
class SfcAIMDriverBase(base.SfcDriverBase):
|
||||
@@ -290,6 +291,8 @@ class SfcAIMDriver(SfcAIMDriverBase):
|
||||
# can be removed once contract export is implemented.
|
||||
# TODO(ivar): two different chains cannot share left/right networks
|
||||
# TODO(ivar): right/left BDs same tenant as provider
|
||||
if len(ppgs) > MAX_PPGS_PER_CHAIN:
|
||||
raise exceptions.TooManyPPGsPerChainError(maxn=MAX_PPGS_PER_CHAIN)
|
||||
vrfs = set()
|
||||
for flowc in flowcs:
|
||||
provg = self._get_flowc_provider_group(p_ctx, flowc)
|
||||
|
||||
Reference in New Issue
Block a user