diff --git a/maas/client/viscera/machines.py b/maas/client/viscera/machines.py index db42cc2..b053fbd 100644 --- a/maas/client/viscera/machines.py +++ b/maas/client/viscera/machines.py @@ -62,7 +62,8 @@ async def create( subarchitecture: str = None, min_hwe_kernel: str = None, hostname: str = None, - domain: typing.Union[int, str] = None + domain: typing.Union[int, str] = None, + skip_bmc_config: bool = None, ): """ Create a new machine. @@ -84,6 +85,8 @@ async def create( :type hostname: `str` :param domain: The domain for the machine (optional). :type domain: `int` or `str` + :param skip_bmc_config: Do not re-configure BMC (optional). + :type skip_bmc_config: `bool` """ params = { "architecture": architecture, @@ -100,6 +103,8 @@ async def create( params["hostname"] = hostname if domain is not None: params["domain"] = domain + if skip_bmc_config is not None: + params["skip_bmc_config"] = skip_bmc_config return cls._object(await cls._handler.create(**params)) async def allocate( diff --git a/maas/client/viscera/tests/test_machines.py b/maas/client/viscera/tests/test_machines.py index 3748774..460a384 100644 --- a/maas/client/viscera/tests/test_machines.py +++ b/maas/client/viscera/tests/test_machines.py @@ -915,6 +915,7 @@ def test__create(self): min_hwe_kernel="hwe-x", hostname="new-machine", domain="maas", + skip_bmc_config=True, ) self.assertThat(observed, IsInstance(Machine)) Machines._handler.create.assert_called_once_with( @@ -928,6 +929,7 @@ def test__create(self): min_hwe_kernel="hwe-x", hostname="new-machine", domain="maas", + skip_bmc_config=True, ) def test__allocate(self):