summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceOVF.py21
-rw-r--r--cloudinit/sources/helpers/vmware/imc/guestcust_util.py13
2 files changed, 15 insertions, 19 deletions
diff --git a/cloudinit/sources/DataSourceOVF.py b/cloudinit/sources/DataSourceOVF.py
index fec13b93..65cefc48 100644
--- a/cloudinit/sources/DataSourceOVF.py
+++ b/cloudinit/sources/DataSourceOVF.py
@@ -31,16 +31,13 @@ import time
from cloudinit import log as logging
from cloudinit import sources
from cloudinit import util
-from cloudinit.sources.helpers.vmware.imc.config import Config
-from cloudinit.sources.helpers.vmware.imc.config_file import ConfigFile
-from cloudinit.sources.helpers.vmware.imc.config_nic import NicConfigurator
-from cloudinit.sources.helpers.vmware.imc.guestcust_event import \
- GuestCustEventEnum
-from cloudinit.sources.helpers.vmware.imc.guestcust_state import \
- GuestCustStateEnum
-from cloudinit.sources.helpers.vmware.imc.guestcust_error import \
- GuestCustErrorEnum
-from cloudinit.sources.helpers.vmware.imc.guestcust_util import (
+from .helpers.vmware.imc.config import Config
+from .helpers.vmware.imc.config_file import ConfigFile
+from .helpers.vmware.imc.config_nic import NicConfigurator
+from .helpers.vmware.imc.guestcust_event import GuestCustEventEnum
+from .helpers.vmware.imc.guestcust_state import GuestCustStateEnum
+from .helpers.vmware.imc.guestcust_error import GuestCustErrorEnum
+from .helpers.vmware.imc.guestcust_util import (
set_customization_status,
get_nics_to_enable,
enable_nics
@@ -135,8 +132,8 @@ class DataSourceOVF(sources.DataSource):
vmwarePlatformFound = True
enable_nics(nics)
set_customization_status(
- GuestCustStateEnum.GUESTCUST_STATE_DONE,
- GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)
+ GuestCustStateEnum.GUESTCUST_STATE_DONE,
+ GuestCustErrorEnum.GUESTCUST_ERROR_SUCCESS)
elif seedfile:
# Found a seed dir
seed = os.path.join(self.paths.seed_dir, seedfile)
diff --git a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
index b8c58f1e..d39f0a65 100644
--- a/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
+++ b/cloudinit/sources/helpers/vmware/imc/guestcust_util.py
@@ -24,7 +24,6 @@ import time
from cloudinit import util
from .guestcust_state import GuestCustStateEnum
-from .guestcust_error import GuestCustErrorEnum
from .guestcust_event import GuestCustEventEnum
logger = logging.getLogger(__name__)
@@ -103,9 +102,9 @@ def enable_nics(nics):
for attempt in range(0, enableNicsWaitRetries):
logger.debug("Trying to connect interfaces, attempt %d", attempt)
(out, err) = set_customization_status(
- GuestCustStateEnum.GUESTCUST_STATE_RUNNING,
- GuestCustEventEnum.GUESTCUST_EVENT_ENABLE_NICS,
- nics)
+ GuestCustStateEnum.GUESTCUST_STATE_RUNNING,
+ GuestCustEventEnum.GUESTCUST_EVENT_ENABLE_NICS,
+ nics)
if not out:
time.sleep(enableNicsWaitCount * enableNicsWaitSeconds)
continue
@@ -116,9 +115,9 @@ def enable_nics(nics):
for count in range(0, enableNicsWaitCount):
(out, err) = set_customization_status(
- GuestCustStateEnum.GUESTCUST_STATE_RUNNING,
- GuestCustEventEnum.GUESTCUST_EVENT_QUERY_NICS,
- nics)
+ GuestCustStateEnum.GUESTCUST_STATE_RUNNING,
+ GuestCustEventEnum.GUESTCUST_EVENT_QUERY_NICS,
+ nics)
if out and out == NICS_STATUS_CONNECTED:
logger.info("NICS are connected on %d second", count)
return