Added User object

User object represents a user account on the target
Operating System.

Change-Id: I70dacf14d4ddf817742008ec7e5e40d4d8c18cca
Blueprint: fuel-nonroot-openstack-nodes
This commit is contained in:
Dmitry Nikishov 2016-02-29 09:57:22 -06:00
parent 20d2288eee
commit 2e608ccc1b
2 changed files with 27 additions and 1 deletions

View File

@ -33,6 +33,7 @@ from fuel_agent.objects.partition.vg import VolumeGroup
from fuel_agent.objects.repo import DEBRepo
from fuel_agent.objects.repo import Repo
from fuel_agent.objects.repo import RepoProxies
from fuel_agent.objects.users import User
PV = PhysicalVolume
@ -69,5 +70,6 @@ __all__ = [
'Repo',
'DEBRepo',
'Loop',
'RepoProxies'
'RepoProxies',
'User'
]

View File

@ -0,0 +1,24 @@
# Copyright 2016 Mirantis, Inc.
#
# 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.
class User(object):
def __init__(self, name, password, homedir, sudo=None, ssh_keys=None,
shell="/bin/bash"):
self.name = name
self.password = password
self.homedir = homedir
self.sudo = sudo or []
self.ssh_keys = ssh_keys or []
self.shell = shell