diff options
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceOpenNebula.py | 6 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 3 | ||||
-rw-r--r-- | cloudinit/sources/__init__.py | 4 | ||||
-rw-r--r-- | cloudinit/sources/helpers/cloudsigma.py | 4 | ||||
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config.py | 5 | ||||
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config_file.py | 36 | ||||
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config_namespace.py | 15 | ||||
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config_nic.py | 10 | ||||
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/ipv4_mode.py | 36 |
9 files changed, 0 insertions, 119 deletions
diff --git a/cloudinit/sources/DataSourceOpenNebula.py b/cloudinit/sources/DataSourceOpenNebula.py index a9744fa1..bcb0927a 100644 --- a/cloudinit/sources/DataSourceOpenNebula.py +++ b/cloudinit/sources/DataSourceOpenNebula.py @@ -161,9 +161,6 @@ class OpenNebulaNetwork: def mac2ip(self, mac): return ".".join([str(int(c, 16)) for c in mac.split(":")[2:]]) - def mac2network(self, mac): - return self.mac2ip(mac).rpartition(".")[0] + ".0" - def get_nameservers(self, dev): nameservers = {} dns = self.get_field(dev, "dns", "").split() @@ -208,9 +205,6 @@ class OpenNebulaNetwork: def get_mask(self, dev): return self.get_field(dev, "mask", "255.255.255.0") - def get_network(self, dev, mac): - return self.get_field(dev, "network", self.mac2network(mac)) - def get_field(self, dev, name, default=None): """return the field name in context for device dev. diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 266daf68..41f6ec27 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -526,9 +526,6 @@ class JoyentMetadataClient: ).decode() return self.request(rtype="PUT", param=param) - def delete(self, key): - return self.request(rtype="DELETE", param=key) - def close_transport(self): if self.fp: self.fp.close() diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index 565e1754..8446178f 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -895,10 +895,6 @@ class DataSource(CloudInitPickleMixin, metaclass=abc.ABCMeta): def network_config(self): return None - @property - def first_instance_boot(self): - return - def setup(self, is_new_instance): """setup(is_new_instance) diff --git a/cloudinit/sources/helpers/cloudsigma.py b/cloudinit/sources/helpers/cloudsigma.py index 5d39946f..1d6a1b45 100644 --- a/cloudinit/sources/helpers/cloudsigma.py +++ b/cloudinit/sources/helpers/cloudsigma.py @@ -53,10 +53,6 @@ class Cepko: request_pattern = self.request_pattern.format("/meta/{}") return self.get(key, request_pattern) - def global_context(self, key=""): - request_pattern = self.request_pattern.format("/global_context/{}") - return self.get(key, request_pattern) - class CepkoResult: """ diff --git a/cloudinit/sources/helpers/vmware/imc/config.py b/cloudinit/sources/helpers/vmware/imc/config.py index df9e5c4b..a129d9a8 100644 --- a/cloudinit/sources/helpers/vmware/imc/config.py +++ b/cloudinit/sources/helpers/vmware/imc/config.py @@ -50,11 +50,6 @@ class Config: return self._configFile.get(Config.TIMEZONE, None) @property - def utc(self): - """Retrieves whether to set time to UTC or Local.""" - return self._configFile.get(Config.UTC, None) - - @property def admin_password(self): """Return the root password to be set.""" return self._configFile.get(Config.PASS, None) diff --git a/cloudinit/sources/helpers/vmware/imc/config_file.py b/cloudinit/sources/helpers/vmware/imc/config_file.py index 37185cba..9f868389 100644 --- a/cloudinit/sources/helpers/vmware/imc/config_file.py +++ b/cloudinit/sources/helpers/vmware/imc/config_file.py @@ -69,39 +69,6 @@ class ConfigFile(ConfigSource, dict): for (key, value) in config.items(category): self._insertKey(category + "|" + key, value) - def should_keep_current_value(self, key): - """ - Determines whether a value for a property must be kept. - - If the propery is missing, it is treated as it should be not - changed by the engine. - - Keyword arguments: - key -- The key to search for. - """ - # helps to distinguish from "empty" value which is used to indicate - # "removal" - return key not in self - - def should_remove_current_value(self, key): - """ - Determines whether a value for the property must be removed. - - If the specified key is empty, it is treated as it should be - removed by the engine. - - Return true if the value can be removed, false otherwise. - - Keyword arguments: - key -- The key to search for. - """ - # helps to distinguish from "missing" value which is used to indicate - # "keeping unchanged" - if key in self: - return not bool(self[key]) - else: - return False - def get_count_with_prefix(self, prefix): """ Return the total count of keys that start with the specified prefix. @@ -110,6 +77,3 @@ class ConfigFile(ConfigSource, dict): prefix -- prefix of the key """ return len([key for key in self if key.startswith(prefix)]) - - -# vi: ts=4 expandtab diff --git a/cloudinit/sources/helpers/vmware/imc/config_namespace.py b/cloudinit/sources/helpers/vmware/imc/config_namespace.py deleted file mode 100644 index d44f4c01..00000000 --- a/cloudinit/sources/helpers/vmware/imc/config_namespace.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2015 Canonical Ltd. -# Copyright (C) 2015 VMware Inc. -# -# Author: Sankar Tanguturi <stanguturi@vmware.com> -# -# This file is part of cloud-init. See LICENSE file for license information. - -from cloudinit.sources.helpers.vmware.imc.config_source import ConfigSource - - -class ConfigNamespace(ConfigSource): - """Specifies the Config Namespace.""" - - -# vi: ts=4 expandtab diff --git a/cloudinit/sources/helpers/vmware/imc/config_nic.py b/cloudinit/sources/helpers/vmware/imc/config_nic.py index 7b9e0974..5ac8cbf1 100644 --- a/cloudinit/sources/helpers/vmware/imc/config_nic.py +++ b/cloudinit/sources/helpers/vmware/imc/config_nic.py @@ -230,16 +230,6 @@ class NicConfigurator: return (subnet_list, route_list) - def _genIpv6Route(self, name, nic, addrs): - route_list = [] - - for addr in addrs: - route_list.append( - {"type": "route", "gateway": addr.gateway, "metric": 10000} - ) - - return route_list - def generate(self, configure=False, osfamily=None): """Return the config elements that are needed to configure the nics""" if configure: diff --git a/cloudinit/sources/helpers/vmware/imc/ipv4_mode.py b/cloudinit/sources/helpers/vmware/imc/ipv4_mode.py deleted file mode 100644 index f290a36f..00000000 --- a/cloudinit/sources/helpers/vmware/imc/ipv4_mode.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2015 Canonical Ltd. -# Copyright (C) 2015 VMware Inc. -# -# Author: Sankar Tanguturi <stanguturi@vmware.com> -# -# This file is part of cloud-init. See LICENSE file for license information. - - -class Ipv4ModeEnum: - """ - The IPv4 configuration mode which directly represents the user's goal. - - This mode effectively acts as a contract of the in-guest customization - engine. It must be set based on what the user has requested and should - not be changed by those layers. It's up to the in-guest engine to - interpret and materialize the user's request. - """ - - # The legacy mode which only allows dhcp/static based on whether IPv4 - # addresses list is empty or not - IPV4_MODE_BACKWARDS_COMPATIBLE = "BACKWARDS_COMPATIBLE" - - # IPv4 must use static address. Reserved for future use - IPV4_MODE_STATIC = "STATIC" - - # IPv4 must use DHCPv4. Reserved for future use - IPV4_MODE_DHCP = "DHCP" - - # IPv4 must be disabled - IPV4_MODE_DISABLED = "DISABLED" - - # IPv4 settings should be left untouched. Reserved for future use - IPV4_MODE_AS_IS = "AS_IS" - - -# vi: ts=4 expandtab |