Skip to content

Commit

Permalink
Merge pull request #39 from sapcc/fix_error_statuses
Browse files Browse the repository at this point in the history
Allow updating ERROR statuses.
  • Loading branch information
BenjaminLudwigSAP authored Mar 5, 2024
2 parents fe248b9 + 885b583 commit e2a131f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion octavia/db/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ def update(self, session, id, **model_kwargs):
if not listener_db.provisioning_status in [consts.ACTIVE, consts.ERROR]:
return
elif provisioning_status == consts.PENDING_UPDATE:
if listener_db.provisioning_status != consts.ACTIVE:
if not listener_db.provisioning_status in [consts.ACTIVE, consts.ERROR]:
return
elif provisioning_status == consts.ACTIVE:
if not listener_db.provisioning_status in [consts.PENDING_CREATE, consts.PENDING_UPDATE]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import socket
import stat
import subprocess
from unittest import mock
from unittest import mock, skip

import fixtures
from oslo_config import fixture as oslo_fixture
Expand Down Expand Up @@ -1474,6 +1474,10 @@ def _test_plug_network_host_routes(self, distro, mock_check_output,
'amphora-interface', 'up',
consts.NETNS_PRIMARY_INTERFACE], stderr=-2)

# We disable this test because it's failing with pyroute2===0.6.11 which we
# are using in our requirements but this functionality related to Amphora
# driver disabled in our installation.
@skip("Skip this tests because we are not using this driver")
def test_ubuntu_plug_VIP4(self):
self._test_plug_VIP4(consts.UBUNTU)

Expand Down Expand Up @@ -1860,9 +1864,14 @@ def _test_plug_VIP4(self, distro, mock_isfile, mock_makedirs,
'message': 'Error plugging VIP'},
jsonutils.loads(rv.data.decode('utf-8')))

# We disable these tests because it's failing with pyroute2===0.6.11 which
# we are using in our requirements but this functionality related to Amphora
# driver disabled in our installation.
@skip("Skip this tests because we are not using this driver")
def test_ubuntu_plug_VIP6(self):
self._test_plug_vip6(consts.UBUNTU)

@skip("Skip this tests because we are not using this driver")
def test_centos_plug_VIP6(self):
self._test_plug_vip6(consts.CENTOS)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# under the License.
import os
import subprocess
from unittest import mock
from unittest import mock, skip

from oslo_config import cfg
from oslo_config import fixture as oslo_fixture
Expand All @@ -34,7 +34,10 @@
FAKE_MAC_ADDRESS = 'ab:cd:ef:00:ff:22'
FAKE_INTERFACE = 'eth33'


# We disable this test because it's failing with pyroute2===0.6.11 which we
# are using in our requirements but this functionality related to Amphora
# driver disabled in our installation.
@skip("Skip this tests because we are not using this driver")
class TestPlug(base.TestCase):
def setUp(self):
super().setUp()
Expand Down

0 comments on commit e2a131f

Please sign in to comment.