
The base classes follows the OS utils architecture spec. Change-Id: I1365e6c9de20dccc905e35113ccdea03f2a03f1b
44 lines
1.3 KiB
Python
44 lines
1.3 KiB
Python
# Copyright (C) 2015 Canonical Ltd.
|
|
# Copyright 2015 Cloudbase Solutions Srl
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# 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 abc
|
|
|
|
import six
|
|
|
|
|
|
@six.add_metaclass(abc.ABCMeta)
|
|
class General(object):
|
|
"""Base class for the general namespace.
|
|
|
|
This class should contain common functions between all OSes,
|
|
which can't be grouped in a domain-specific namespace.
|
|
"""
|
|
|
|
@abc.abstractmethod
|
|
def set_timezone(self, timezone):
|
|
"""Change the timezone for the underlying platform.
|
|
|
|
The `timezone` parameter should be a TZID timezone format,
|
|
e.g. 'Africa/Mogadishu'
|
|
"""
|
|
|
|
@abc.abstractmethod
|
|
def set_locale(self, locale):
|
|
"""Change the locale for the underlying platform."""
|
|
|
|
@abc.abstractmethod
|
|
def reboot(self):
|
|
pass
|