Remove munch dependency

This is not maintained and is no longer used by openstacksdk. There are
only three users of the library, one of which is incorrect and the
remainder of which we can easily replace.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iae5b09dc163e8a4e0ed51f065079301b7e4287d3
This commit is contained in:
Stephen Finucane 2023-02-21 10:35:59 +00:00
parent 235e5677b4
commit b2b916f96f
3 changed files with 11 additions and 9 deletions

View File

@ -10,12 +10,10 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
import functools
import ipaddress
import munch
from openstackclient.identity import common as identity_common
from osc_lib import exceptions as osc_exc
from osc_lib import utils
@ -716,9 +714,13 @@ def get_unsets(parsed_args):
return unsets
class _Munch(dict):
__getattr__ = dict.get
def wait_for_active(status_f, res_id):
success = utils.wait_for_status(
status_f=lambda x: munch.Munch(status_f(x)),
status_f=lambda x: _Munch(status_f(x)),
res_id=res_id,
status_field=constants.PROVISIONING_STATUS,
sleep_time=3
@ -734,7 +736,7 @@ def wait_for_delete(status_f, res_id,
class Getter(object):
@staticmethod
def get(id):
return munch.Munch(status_f(id))
return _Munch(status_f(id))
try:
success = utils.wait_for_delete(

View File

@ -9,12 +9,12 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
import argparse
import copy
import itertools
from unittest import mock
import munch
from osc_lib import exceptions
from oslo_utils import uuidutils
@ -506,10 +506,11 @@ class TestLoadBalancerCreate(TestLoadBalancer):
self.assertRaises(
exceptions.CommandError,
self.cmd.take_action,
filtered_attrs)
argparse.Namespace(**filtered_attrs),
)
else:
try:
self.cmd.take_action(munch.Munch(filtered_attrs))
self.cmd.take_action(argparse.Namespace(**filtered_attrs))
except exceptions.CommandError as e:
self.fail("%s raised unexpectedly" % e)

View File

@ -15,4 +15,3 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
pbr!=2.1.0,>=2.0.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
munch>=2.1.0 # MIT