Convert OBSLocal documentation to reStructured Text
This commit is contained in:
parent
f16c803e7c
commit
ab1baf665d
@ -168,10 +168,10 @@ class TestCase(unittest.TestCase):
|
|||||||
class StagingWorkflow(object):
|
class StagingWorkflow(object):
|
||||||
def __init__(self, project=PROJECT):
|
def __init__(self, project=PROJECT):
|
||||||
"""
|
"""
|
||||||
Initialize the configuration
|
Initializes the configuration
|
||||||
|
|
||||||
Parameters:
|
:param project: default target project
|
||||||
project(str): default target project
|
:type project: str
|
||||||
"""
|
"""
|
||||||
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||||
oscrc = os.path.join(THIS_DIR, 'test.oscrc')
|
oscrc = os.path.join(THIS_DIR, 'test.oscrc')
|
||||||
@ -256,9 +256,10 @@ class StagingWorkflow(object):
|
|||||||
|
|
||||||
If group already exist then it just update users.
|
If group already exist then it just update users.
|
||||||
|
|
||||||
Parameters:
|
:param name: name of group
|
||||||
name(str): name of group
|
:type name: str
|
||||||
name(list of str): list of users to be in group
|
:param users: list of users to be in group
|
||||||
|
:type users: list of str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
meta = """
|
meta = """
|
||||||
@ -285,11 +286,11 @@ class StagingWorkflow(object):
|
|||||||
|
|
||||||
Password is always "opensuse".
|
Password is always "opensuse".
|
||||||
Do nothing if user already exist.
|
Do nothing if user already exist.
|
||||||
|
The home project is not really created in the OBS instance, but update_meta can
|
||||||
|
be used to create it.
|
||||||
|
|
||||||
Parameters:
|
:param name: name of the user
|
||||||
name(str): name of user
|
:type name: str
|
||||||
|
|
||||||
Returns home Project. Project is not created. To create it use update_meta method.
|
|
||||||
"""
|
"""
|
||||||
if name in self.users: return
|
if name in self.users: return
|
||||||
meta = """
|
meta = """
|
||||||
@ -357,7 +358,8 @@ class StagingWorkflow(object):
|
|||||||
|
|
||||||
For params see Project#__init__
|
For params see Project#__init__
|
||||||
|
|
||||||
Returns Project instance for given project.
|
:return: the project instance representing the given project
|
||||||
|
:rtype: Project
|
||||||
"""
|
"""
|
||||||
if isinstance(name, Project):
|
if isinstance(name, Project):
|
||||||
return name
|
return name
|
||||||
@ -374,12 +376,12 @@ class StagingWorkflow(object):
|
|||||||
|
|
||||||
Both have to exist, otherwise looks at create_submit_request method.
|
Both have to exist, otherwise looks at create_submit_request method.
|
||||||
|
|
||||||
Parameters:
|
:param package: package to submit TODO: what means None here?
|
||||||
package(Package): package to submit TODO: what means None here?
|
:type package: Package or None
|
||||||
project(Project|str): project where to send submit request.
|
:param project: project where to send submit request, None means use the default.
|
||||||
None means use the default.
|
:type project: Project or str or None
|
||||||
|
:return: created request.
|
||||||
Returns created request.
|
:rtype: Request
|
||||||
"""
|
"""
|
||||||
if not project:
|
if not project:
|
||||||
project = self.project
|
project = self.project
|
||||||
@ -401,12 +403,14 @@ class StagingWorkflow(object):
|
|||||||
Package is commited with optional text.
|
Package is commited with optional text.
|
||||||
Note different parameters than submit_package.
|
Note different parameters than submit_package.
|
||||||
|
|
||||||
Parameters:
|
:param project: project where package will live
|
||||||
project(Project|str): project where package will live
|
:type project: Project or str
|
||||||
package(str): package name to create
|
:param package: package name to create
|
||||||
text(str): commit message for initial package creation
|
:type package: str
|
||||||
|
:param text: commit message for initial package creation
|
||||||
Returns created request.
|
:type text: str
|
||||||
|
:return: created request.
|
||||||
|
:rtype: Request
|
||||||
"""
|
"""
|
||||||
project = self.create_project(project)
|
project = self.create_project(project)
|
||||||
package = Package(name=package, project=project)
|
package = Package(name=package, project=project)
|
||||||
@ -471,14 +475,16 @@ class Project(object):
|
|||||||
"""
|
"""
|
||||||
Represents Project in OBS.
|
Represents Project in OBS.
|
||||||
|
|
||||||
Parameters:
|
:param name: project name
|
||||||
name(str): Project name
|
:type name: str
|
||||||
reviewer: TODO
|
:param reviewer: TODO
|
||||||
maintainer: TODO
|
:param maintainer: TODO
|
||||||
project_links(list of str): names of linked project from which
|
:param project_links: names of linked project from which it inherits
|
||||||
it inherits
|
:type project_links: list of str
|
||||||
create(bool): if create during instantiation
|
:param create: if create during instantiation
|
||||||
with_repo(bool): TODO
|
:type create: bool
|
||||||
|
:param with_repo: TODO
|
||||||
|
:type with_repo: bool
|
||||||
"""
|
"""
|
||||||
self.name = name
|
self.name = name
|
||||||
self.packages = []
|
self.packages = []
|
||||||
@ -545,12 +551,15 @@ class Package(object):
|
|||||||
"""
|
"""
|
||||||
Represents Package in OBS. It is created when instantiated.
|
Represents Package in OBS. It is created when instantiated.
|
||||||
|
|
||||||
Parameters:
|
:param name: Package name
|
||||||
name(str): Package name
|
:type name: str
|
||||||
project(Project): project where package lives
|
:param project: project where package lives
|
||||||
devel_project(str): name of devel project. Package has to
|
:type project: Project
|
||||||
already exists there, otherwise OBS returns 400.
|
:param devel_project: name of devel project. Package has to already exists there,
|
||||||
|
otherwise OBS returns 400.
|
||||||
|
:type devel_project: str
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.name = name
|
self.name = name
|
||||||
self.project = project
|
self.project = project
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user