aboutsummaryrefslogtreecommitdiffstats
path: root/environments/net-bond-with-vlans.yaml
blob: 38c31cac0add2acb385f56161eeeca7cfb7ca4f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# This template configures each role to use a pair of bonded nics (nic2 and
# nic3) and configures an IP address on each relevant isolated network
# for each role. This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
  OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml
  OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute.yaml
  OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller.yaml
  OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml
  OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml
sd">"""Packet forwarder controller for P2P deployment scenario. Attributes: _pktfwd_class: The packet forwarder class to be used. _pktfwd: The packet forwarder object controlled by this controller """ def __init__(self, deployment, pktfwd_class): """Initializes up the prerequisites for the P2P deployment scenario. :vswitch_class: the vSwitch class to be used. """ self._deployment = deployment self._logger = logging.getLogger(__name__) self._pktfwd_class = pktfwd_class self._pktfwd = pktfwd_class() self._logger.debug('Creation using ' + str(self._pktfwd_class)) def setup(self): """Sets up the packet forwarder for p2p. """ self._logger.debug('Setup using ' + str(self._pktfwd_class)) try: self._pktfwd.start() except: self._pktfwd.stop() raise def stop(self): """Tears down the packet forwarder created in setup(). """ self._logger.debug('Stop using ' + str(self._pktfwd_class)) self._pktfwd.stop() def __enter__(self): if self._deployment.find("p2p") == 0: self.setup() def __exit__(self, type_, value, traceback): if self._deployment.find("p2p") == 0: self.stop() def get_pktfwd(self): """Get the controlled packet forwarder :return: The controlled IPktFwd """ return self._pktfwd def dump_vswitch_flows(self): """ Dumps flows from vswitch """ raise NotImplementedError( "The PktFwdController does not implement the " "\"dump_vswitch_flows\" function.")