Exemplo n.º 1
0
 def __init__(self, **kwargs):
     """Initialize contexts consumed from charm helpers."""
     super().__init__(**kwargs)
     self._dpdk_device = self.OSContextObjectView(
         os_context.DPDKDeviceContext(
             bridges_key=self.charm_instance.bridges_key)())
     self._sriov_device = os_context.SRIOVContext()
Exemplo n.º 2
0
 def __init__(self, **kwargs):
     """Initialize contexts consumed from charm helpers."""
     super().__init__(**kwargs)
     self._dpdk_device = None
     self._sriov_device = None
     self._disable_mlockall = None
     if ch_core.hookenv.config('enable-dpdk'):
         self._dpdk_device = self.OSContextObjectView(
             os_context.DPDKDeviceContext(
                 bridges_key=self.charm_instance.bridges_key)())
     if (ch_core.hookenv.config('enable-hardware-offload')
             or ch_core.hookenv.config('enable-sriov')):
         self._sriov_device = os_context.SRIOVContext()
Exemplo n.º 3
0
 def __init__(self):
     self._sriov_device = context.SRIOVContext()