Enable basic gate jobs
This patch enables the basic pep8 and unittests jobs. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com> Change-Id: Ibce2e868bdd194d84cf9f75555a9fdf9af905bc9
This commit is contained in:
parent
f5ef3c8f31
commit
8aed020eee
|
@ -1,3 +0,0 @@
|
|||
- project:
|
||||
templates:
|
||||
- noop-jobs
|
|
@ -36,6 +36,5 @@ BGP_MODE = 'BGP'
|
|||
|
||||
OVN_INTEGRATION_BRIDGE = 'br-int'
|
||||
|
||||
|
||||
LINK_UP = "up"
|
||||
LINK_DOWN = "down"
|
||||
LINK_DOWN = "down"
|
||||
|
|
|
@ -240,8 +240,10 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
ports = self.sb_idl.get_ports_on_datapath(
|
||||
network_port_datapath)
|
||||
for port in ports:
|
||||
if ((port.type != constants.OVN_VM_VIF_PORT_TYPE and port.type != constants.OVN_VIRTUAL_VIF_PORT_TYPE) or
|
||||
(port.type == constants.OVN_VM_VIF_PORT_TYPE and not port.chassis)):
|
||||
if (port.type not in (constants.OVN_VM_VIF_PORT_TYPE,
|
||||
constants.OVN_VIRTUAL_VIF_PORT_TYPE) or
|
||||
(port.type == constants.OVN_VM_VIF_PORT_TYPE and
|
||||
not port.chassis)):
|
||||
continue
|
||||
try:
|
||||
port_ips = [port.mac[0].split(' ')[1]]
|
||||
|
@ -338,8 +340,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
|
||||
def _expose_ip(self, ips, row, associated_port=None):
|
||||
# VM on provider Network
|
||||
if ((row.type == constants.OVN_VM_VIF_PORT_TYPE
|
||||
or row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE) and
|
||||
if ((row.type == constants.OVN_VM_VIF_PORT_TYPE or
|
||||
row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE) and
|
||||
self.sb_idl.is_provider_network(row.datapath)):
|
||||
LOG.info("Add BGP route for logical port with ip %s", ips)
|
||||
linux_net.add_ips_to_dev(constants.OVN_BGP_NIC, ips)
|
||||
|
@ -355,8 +357,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
vlan=vlan_tag)
|
||||
|
||||
# VM with FIP
|
||||
elif (row.type == constants.OVN_VM_VIF_PORT_TYPE
|
||||
or row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
elif (row.type == constants.OVN_VM_VIF_PORT_TYPE or
|
||||
row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
# FIPs are only supported with IPv4
|
||||
fip_address, fip_datapath = self.sb_idl.get_fip_associated(
|
||||
row.logical_port)
|
||||
|
@ -462,8 +464,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
- CR-LRP OVN port
|
||||
'''
|
||||
# VM on provider Network
|
||||
if ((row.type == constants.OVN_VM_VIF_PORT_TYPE
|
||||
or row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE) and
|
||||
if ((row.type == constants.OVN_VM_VIF_PORT_TYPE or
|
||||
row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE) and
|
||||
self.sb_idl.is_provider_network(row.datapath)):
|
||||
LOG.info("Delete BGP route for logical port with ip %s", ips)
|
||||
linux_net.del_ips_from_dev(constants.OVN_BGP_NIC, ips)
|
||||
|
@ -479,8 +481,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
vlan=vlan_tag)
|
||||
|
||||
# VM with FIP
|
||||
elif (row.type == constants.OVN_VM_VIF_PORT_TYPE
|
||||
or row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
elif (row.type == constants.OVN_VM_VIF_PORT_TYPE or
|
||||
row.type == constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
# FIPs are only supported with IPv4
|
||||
fip_address, fip_datapath = self.sb_idl.get_fip_associated(
|
||||
row.logical_port)
|
||||
|
@ -601,8 +603,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
cr_lrp = self.sb_idl.is_router_gateway_on_chassis(row.datapath,
|
||||
self.chassis)
|
||||
if cr_lrp:
|
||||
LOG.info("Add IP Rules for network %s on chassis %s",
|
||||
ip, self.chassis)
|
||||
LOG.info("Add IP Rules for network %s on chassis %s", ip,
|
||||
self.chassis)
|
||||
self.ovn_local_lrps.add(row.logical_port)
|
||||
cr_lrp_info = self.ovn_local_cr_lrps.get(cr_lrp, {})
|
||||
cr_lrp_datapath = cr_lrp_info.get('provider_datapath')
|
||||
|
@ -636,7 +638,9 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
ports = self.sb_idl.get_ports_on_datapath(
|
||||
network_port_datapath)
|
||||
for port in ports:
|
||||
if port.type != constants.OVN_VM_VIF_PORT_TYPE and port.type != constants.OVN_VIRTUAL_VIF_PORT_TYPE:
|
||||
if port.type not in (
|
||||
constants.OVN_VM_VIF_PORT_TYPE,
|
||||
constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
continue
|
||||
try:
|
||||
port_ips = [port.mac[0].split(' ')[1]]
|
||||
|
@ -660,8 +664,8 @@ class OSPOVNBGPDriver(driver_api.AgentDriverBase):
|
|||
cr_lrp = self.sb_idl.is_router_gateway_on_chassis(row.datapath,
|
||||
self.chassis)
|
||||
if cr_lrp:
|
||||
LOG.info("Delete IP Rules for network %s on chassis %s",
|
||||
ip, self.chassis)
|
||||
LOG.info("Delete IP Rules for network %s on chassis %s", ip,
|
||||
self.chassis)
|
||||
if row.logical_port in self.ovn_local_lrps:
|
||||
self.ovn_local_lrps.remove(row.logical_port)
|
||||
cr_lrp_info = self.ovn_local_cr_lrps.get(cr_lrp, {})
|
||||
|
|
|
@ -147,7 +147,8 @@ class OvsdbSbOvnIdl(sb_impl_idl.OvnSbApiIdlImpl, Backend):
|
|||
def is_port_on_chassis(self, port_name, chassis):
|
||||
port_info = self._get_port_by_name(port_name)
|
||||
try:
|
||||
if (port_info and port_info.type == constants.OVN_VM_VIF_PORT_TYPE and
|
||||
if (port_info and
|
||||
port_info.type == constants.OVN_VM_VIF_PORT_TYPE and
|
||||
port_info.chassis[0].name == chassis):
|
||||
return True
|
||||
except IndexError:
|
||||
|
@ -174,7 +175,7 @@ class OvsdbSbOvnIdl(sb_impl_idl.OvnSbApiIdlImpl, Backend):
|
|||
|
||||
def get_network_vlan_tag_by_network_name(self, network_name):
|
||||
cmd = self.db_find_rows('Port_Binding', ('type', '=',
|
||||
constants.OVN_LOCALNET_VIF_PORT_TYPE))
|
||||
constants.OVN_LOCALNET_VIF_PORT_TYPE))
|
||||
for row in cmd.execute(check_error=True):
|
||||
if (row.options and
|
||||
row.options.get('network_name') == network_name):
|
||||
|
|
|
@ -206,7 +206,8 @@ class TenantPortCreatedEvent(PortBindingChassisEvent):
|
|||
return False
|
||||
|
||||
def run(self, event, row, old):
|
||||
if row.type != constants.OVN_VM_VIF_PORT_TYPE and row.type != constants.OVN_VIRTUAL_VIF_PORT_TYPE:
|
||||
if row.type not in (constants.OVN_VM_VIF_PORT_TYPE,
|
||||
constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
return
|
||||
with _SYNC_STATE_LOCK.read_lock():
|
||||
ips = [row.mac[0].split(' ')[1]]
|
||||
|
@ -233,7 +234,8 @@ class TenantPortDeletedEvent(PortBindingChassisEvent):
|
|||
return False
|
||||
|
||||
def run(self, event, row, old):
|
||||
if row.type != constants.OVN_VM_VIF_PORT_TYPE and row.type != constants.OVN_VIRTUAL_VIF_PORT_TYPE:
|
||||
if row.type not in (constants.OVN_VM_VIF_PORT_TYPE,
|
||||
constants.OVN_VIRTUAL_VIF_PORT_TYPE):
|
||||
return
|
||||
with _SYNC_STATE_LOCK.read_lock():
|
||||
ips = [row.mac[0].split(' ')[1]]
|
||||
|
|
|
@ -99,9 +99,8 @@ def ensure_dummy_device(device):
|
|||
if iface['state'] != constants.LINK_UP:
|
||||
iface['state'] = constants.LINK_UP
|
||||
except KeyError:
|
||||
ndb.interfaces.create(
|
||||
kind="dummy", ifname=device).set('state',
|
||||
constants.LINK_UP).commit()
|
||||
ndb.interfaces.create(kind="dummy", ifname=device).set(
|
||||
'state', constants.LINK_UP).commit()
|
||||
|
||||
|
||||
def ensure_ovn_device(ovn_ifname, vrf_name):
|
||||
|
@ -234,8 +233,8 @@ def ensure_vlan_device_for_network(bridge, vlan_tag):
|
|||
except KeyError:
|
||||
ndb.interfaces.create(
|
||||
kind="vlan", ifname=vlan_device_name, vlan_id=vlan_tag,
|
||||
link=ndb.interfaces[bridge]['index']).set('state',
|
||||
constants.LINK_UP).commit()
|
||||
link=ndb.interfaces[bridge]['index']).set(
|
||||
'state', constants.LINK_UP).commit()
|
||||
|
||||
ipv4_flag = "net.ipv4.conf.{}/{}.proxy_arp".format(bridge, vlan_tag)
|
||||
_set_kernel_flag(ipv4_flag, 1)
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
- project:
|
||||
templates:
|
||||
- openstack-python3-xena-jobs
|
Loading…
Reference in New Issue