Пример #1
0
 def attach(self, flow, ikernel):
     ip_addr = inet_aton(flow[0])
     return self.invoke(HypervisorOpcodes.ATTACH, Struct('IHI'),
                        (ip_addr, flow[1], ikernel.ikernel_id),
                        Struct('II'))
Пример #2
0
 def detach(self, flow, ikernel):
     ip_addr = inet_aton(flow[0])
     self.invoke(HypervisorOpcodes.DETACH, Struct('IHI'),
                 (ip_addr, flow[1], ikernel.ikernel_id))
Пример #3
0
 def configure_custom_ring(self, mac, ip_addr):
     self.invoke(HypervisorOpcodes.CONFIG_CUSTOM_RING, Struct('6sI'),
                 (str_to_mac(mac), inet_aton(ip_addr)))