Raises NotImplemetedError in osutils base class methods

This commit is contained in:
Alessandro Pilotti 2013-12-14 17:30:08 +02:00
parent f5210e3910
commit 02a2a77e38

View File

@ -24,10 +24,10 @@ PROTOCOL_UDP = "UDP"
class BaseOSUtils(object): class BaseOSUtils(object):
def reboot(self): def reboot(self):
pass raise NotImplementedError()
def user_exists(self, username): def user_exists(self, username):
pass raise NotImplementedError()
def generate_random_password(self, length): def generate_random_password(self, length):
# On Windows os.urandom() uses CryptGenRandom, which is a # On Windows os.urandom() uses CryptGenRandom, which is a
@ -44,36 +44,36 @@ class BaseOSUtils(object):
return (out, err, p.returncode) return (out, err, p.returncode)
def sanitize_shell_input(self, value): def sanitize_shell_input(self, value):
pass raise NotImplementedError()
def create_user(self, username, password, password_expires=False): def create_user(self, username, password, password_expires=False):
pass raise NotImplementedError()
def set_user_password(self, username, password, password_expires=False): def set_user_password(self, username, password, password_expires=False):
pass raise NotImplementedError()
def add_user_to_local_group(self, username, groupname): def add_user_to_local_group(self, username, groupname):
pass raise NotImplementedError()
def set_host_name(self, new_host_name): def set_host_name(self, new_host_name):
pass raise NotImplementedError()
def get_user_home(self, username): def get_user_home(self, username):
pass raise NotImplementedError()
def get_network_adapters(self): def get_network_adapters(self):
pass raise NotImplementedError()
def set_static_network_config(self, adapter_name, address, netmask, def set_static_network_config(self, adapter_name, address, netmask,
broadcast, gateway, dnsdomain, broadcast, gateway, dnsdomain,
dnsnameservers): dnsnameservers):
pass raise NotImplementedError()
def set_config_value(self, name, value, section=None): def set_config_value(self, name, value, section=None):
pass raise NotImplementedError()
def get_config_value(self, name, section=None): def get_config_value(self, name, section=None):
pass raise NotImplementedError()
def wait_for_boot_completion(self): def wait_for_boot_completion(self):
pass pass
@ -82,20 +82,20 @@ class BaseOSUtils(object):
pass pass
def get_default_gateway(self): def get_default_gateway(self):
pass raise NotImplementedError()
def check_static_route_exists(self, destination): def check_static_route_exists(self, destination):
pass raise NotImplementedError()
def add_static_route(self, destination, mask, next_hop, interface_index, def add_static_route(self, destination, mask, next_hop, interface_index,
metric): metric):
pass raise NotImplementedError()
def check_os_version(self, major, minor, build=0): def check_os_version(self, major, minor, build=0):
pass raise NotImplementedError()
def get_volume_label(self, drive): def get_volume_label(self, drive):
pass raise NotImplementedError()
def firewall_create_rule(self, name, port, protocol, allow=True): def firewall_create_rule(self, name, port, protocol, allow=True):
raise NotImplementedError() raise NotImplementedError()