Merge "chore(docstring): Fix up improper sphinx syntax in docstrings"
This commit is contained in:
commit
3d855544b4
|
@ -55,9 +55,9 @@ class K8s(object):
|
||||||
propagation_policy='Foreground',
|
propagation_policy='Foreground',
|
||||||
timeout=DEFAULT_K8S_TIMEOUT):
|
timeout=DEFAULT_K8S_TIMEOUT):
|
||||||
'''
|
'''
|
||||||
:params name - name of job
|
:param name: name of job
|
||||||
:params namespace - namespace of job
|
:param namespace: namespace of job
|
||||||
:params propagation_policy - The Kubernetes propagation_policy to apply
|
:param propagation_policy: The Kubernetes propagation_policy to apply
|
||||||
to the delete. Default 'Foreground' means that child pods to the
|
to the delete. Default 'Foreground' means that child pods to the
|
||||||
job will be deleted before the job is marked as deleted.
|
job will be deleted before the job is marked as deleted.
|
||||||
'''
|
'''
|
||||||
|
@ -71,9 +71,9 @@ class K8s(object):
|
||||||
propagation_policy='Foreground',
|
propagation_policy='Foreground',
|
||||||
timeout=DEFAULT_K8S_TIMEOUT):
|
timeout=DEFAULT_K8S_TIMEOUT):
|
||||||
'''
|
'''
|
||||||
:params name - name of cron job
|
:param name: name of cron job
|
||||||
:params namespace - namespace of cron job
|
:param namespace: namespace of cron job
|
||||||
:params propagation_policy - The Kubernetes propagation_policy to apply
|
:param propagation_policy: The Kubernetes propagation_policy to apply
|
||||||
to the delete. Default 'Foreground' means that child pods of the
|
to the delete. Default 'Foreground' means that child pods of the
|
||||||
cron job will be deleted before the cron job is marked as deleted.
|
cron job will be deleted before the cron job is marked as deleted.
|
||||||
'''
|
'''
|
||||||
|
@ -137,8 +137,8 @@ class K8s(object):
|
||||||
|
|
||||||
def get_namespace_job(self, namespace="default", label_selector=''):
|
def get_namespace_job(self, namespace="default", label_selector=''):
|
||||||
'''
|
'''
|
||||||
:params label_selector - labels of the jobs
|
:param label_selector: labels of the jobs
|
||||||
:params namespace - namespace of the jobs
|
:param namespace: namespace of the jobs
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -150,8 +150,8 @@ class K8s(object):
|
||||||
|
|
||||||
def get_namespace_cron_job(self, namespace="default", label_selector=''):
|
def get_namespace_cron_job(self, namespace="default", label_selector=''):
|
||||||
'''
|
'''
|
||||||
:params label_selector - labels of the cron jobs
|
:param label_selector: labels of the cron jobs
|
||||||
:params namespace - namespace of the cron jobs
|
:param namespace: namespace of the cron jobs
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -164,16 +164,16 @@ class K8s(object):
|
||||||
|
|
||||||
def create_job_action(self, name, namespace="default"):
|
def create_job_action(self, name, namespace="default"):
|
||||||
'''
|
'''
|
||||||
:params name - name of the job
|
:param name: name of the job
|
||||||
:params namespace - name of pod that job
|
:param namespace: name of pod that job
|
||||||
'''
|
'''
|
||||||
# TODO(MarshM) this does nothing?
|
# TODO(MarshM) this does nothing?
|
||||||
LOG.debug(" %s in namespace: %s", name, namespace)
|
LOG.debug(" %s in namespace: %s", name, namespace)
|
||||||
|
|
||||||
def get_namespace_pod(self, namespace="default", label_selector=''):
|
def get_namespace_pod(self, namespace="default", label_selector=''):
|
||||||
'''
|
'''
|
||||||
:params namespace - namespace of the Pod
|
:param namespace: namespace of the Pod
|
||||||
:params label_selector - filters Pods by label
|
:param label_selector: filters Pods by label
|
||||||
|
|
||||||
This will return a list of objects req namespace
|
This will return a list of objects req namespace
|
||||||
'''
|
'''
|
||||||
|
@ -184,7 +184,7 @@ class K8s(object):
|
||||||
# TODO(MarshM) unused?
|
# TODO(MarshM) unused?
|
||||||
def get_all_pods(self, label_selector=''):
|
def get_all_pods(self, label_selector=''):
|
||||||
'''
|
'''
|
||||||
:params label_selector - filters Pods by label
|
:param label_selector: filters Pods by label
|
||||||
|
|
||||||
Returns a list of pods from all namespaces
|
Returns a list of pods from all namespaces
|
||||||
'''
|
'''
|
||||||
|
@ -194,16 +194,16 @@ class K8s(object):
|
||||||
|
|
||||||
def get_namespace_daemonset(self, namespace='default', label=''):
|
def get_namespace_daemonset(self, namespace='default', label=''):
|
||||||
'''
|
'''
|
||||||
:param namespace - namespace of target deamonset
|
:param namespace: namespace of target deamonset
|
||||||
:param labels - specify targeted daemonset
|
:param labels: specify targeted daemonset
|
||||||
'''
|
'''
|
||||||
return self.extension_api.list_namespaced_daemon_set(
|
return self.extension_api.list_namespaced_daemon_set(
|
||||||
namespace, label_selector=label)
|
namespace, label_selector=label)
|
||||||
|
|
||||||
def create_daemon_action(self, namespace, template):
|
def create_daemon_action(self, namespace, template):
|
||||||
'''
|
'''
|
||||||
:param - namespace - pod namespace
|
:param: namespace - pod namespace
|
||||||
:param - template - deploy daemonset via yaml
|
:param: template - deploy daemonset via yaml
|
||||||
'''
|
'''
|
||||||
# we might need to load something here
|
# we might need to load something here
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ class K8s(object):
|
||||||
|
|
||||||
def delete_daemon_action(self, name, namespace="default", body=None):
|
def delete_daemon_action(self, name, namespace="default", body=None):
|
||||||
'''
|
'''
|
||||||
:params - namespace - pod namespace
|
:param: namespace - pod namespace
|
||||||
|
|
||||||
This will delete daemonset
|
This will delete daemonset
|
||||||
'''
|
'''
|
||||||
|
@ -225,9 +225,9 @@ class K8s(object):
|
||||||
|
|
||||||
def delete_namespace_pod(self, name, namespace="default", body=None):
|
def delete_namespace_pod(self, name, namespace="default", body=None):
|
||||||
'''
|
'''
|
||||||
:params name - name of the Pod
|
:param name: name of the Pod
|
||||||
:params namespace - namespace of the Pod
|
:param namespace: namespace of the Pod
|
||||||
:params body - V1DeleteOptions
|
:param body: V1DeleteOptions
|
||||||
|
|
||||||
Deletes pod by name and returns V1Status object
|
Deletes pod by name and returns V1Status object
|
||||||
'''
|
'''
|
||||||
|
@ -238,8 +238,8 @@ class K8s(object):
|
||||||
|
|
||||||
def wait_for_pod_redeployment(self, old_pod_name, namespace):
|
def wait_for_pod_redeployment(self, old_pod_name, namespace):
|
||||||
'''
|
'''
|
||||||
:param old_pod_name - name of pods
|
:param old_pod_name: name of pods
|
||||||
:param namespace - kubernetes namespace
|
:param namespace: kubernetes namespace
|
||||||
'''
|
'''
|
||||||
|
|
||||||
base_pod_pattern = re.compile('^(.+)-[a-zA-Z0-9]+$')
|
base_pod_pattern = re.compile('^(.+)-[a-zA-Z0-9]+$')
|
||||||
|
@ -274,8 +274,8 @@ class K8s(object):
|
||||||
def wait_get_completed_podphase(self, release,
|
def wait_get_completed_podphase(self, release,
|
||||||
timeout=DEFAULT_K8S_TIMEOUT):
|
timeout=DEFAULT_K8S_TIMEOUT):
|
||||||
'''
|
'''
|
||||||
:param release - part of namespace
|
:param release: part of namespace
|
||||||
:param timeout - time before disconnecting stream
|
:param timeout: time before disconnecting stream
|
||||||
'''
|
'''
|
||||||
timeout = self._check_timeout(timeout)
|
timeout = self._check_timeout(timeout)
|
||||||
|
|
||||||
|
|
|
@ -241,8 +241,8 @@ class Tiller(object):
|
||||||
def _pre_update_actions(self, actions, release_name, namespace, chart,
|
def _pre_update_actions(self, actions, release_name, namespace, chart,
|
||||||
disable_hooks, values, timeout):
|
disable_hooks, values, timeout):
|
||||||
'''
|
'''
|
||||||
:params actions - array of items actions
|
:param actions: array of items actions
|
||||||
:params namespace - name of pod for actions
|
:param namespace: name of pod for actions
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -442,11 +442,11 @@ class Tiller(object):
|
||||||
timeout=const.DEFAULT_TILLER_TIMEOUT,
|
timeout=const.DEFAULT_TILLER_TIMEOUT,
|
||||||
cleanup=True):
|
cleanup=True):
|
||||||
'''
|
'''
|
||||||
:param release - name of release to test
|
:param release: name of release to test
|
||||||
:param timeout - runtime before exiting
|
:param timeout: runtime before exiting
|
||||||
:param cleanup - removes testing pod created
|
:param cleanup: removes testing pod created
|
||||||
|
|
||||||
:returns - test suite run object
|
:returns: test suite run object
|
||||||
'''
|
'''
|
||||||
|
|
||||||
LOG.info("Running Helm test: release=%s, timeout=%s", release, timeout)
|
LOG.info("Running Helm test: release=%s, timeout=%s", release, timeout)
|
||||||
|
@ -483,8 +483,8 @@ class Tiller(object):
|
||||||
|
|
||||||
def get_release_status(self, release, version=0):
|
def get_release_status(self, release, version=0):
|
||||||
'''
|
'''
|
||||||
:param release - name of release to test
|
:param release: name of release to test
|
||||||
:param version - version of release status
|
:param version: version of release status
|
||||||
'''
|
'''
|
||||||
|
|
||||||
LOG.debug('Helm getting release status for release=%s, version=%s',
|
LOG.debug('Helm getting release status for release=%s, version=%s',
|
||||||
|
@ -504,8 +504,8 @@ class Tiller(object):
|
||||||
|
|
||||||
def get_release_content(self, release, version=0):
|
def get_release_content(self, release, version=0):
|
||||||
'''
|
'''
|
||||||
:param release - name of release to test
|
:param release: name of release to test
|
||||||
:param version - version of release status
|
:param version: version of release status
|
||||||
'''
|
'''
|
||||||
|
|
||||||
LOG.debug('Helm getting release content for release=%s, version=%s',
|
LOG.debug('Helm getting release content for release=%s, version=%s',
|
||||||
|
@ -525,7 +525,7 @@ class Tiller(object):
|
||||||
|
|
||||||
def tiller_version(self):
|
def tiller_version(self):
|
||||||
'''
|
'''
|
||||||
:returns - Tiller version
|
:returns: Tiller version
|
||||||
'''
|
'''
|
||||||
try:
|
try:
|
||||||
stub = ReleaseServiceStub(self.channel)
|
stub = ReleaseServiceStub(self.channel)
|
||||||
|
@ -545,10 +545,10 @@ class Tiller(object):
|
||||||
|
|
||||||
def uninstall_release(self, release, disable_hooks=False, purge=True):
|
def uninstall_release(self, release, disable_hooks=False, purge=True):
|
||||||
'''
|
'''
|
||||||
:params - release - Helm chart release name
|
:param: release - Helm chart release name
|
||||||
:params - purge - deep delete of chart
|
:param: purge - deep delete of chart
|
||||||
|
|
||||||
deletes a Helm chart from Tiller
|
Deletes a Helm chart from Tiller
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# Helm client calls ReleaseContent in Delete dry-run scenario
|
# Helm client calls ReleaseContent in Delete dry-run scenario
|
||||||
|
@ -586,11 +586,11 @@ class Tiller(object):
|
||||||
wait=False,
|
wait=False,
|
||||||
timeout=const.DEFAULT_TILLER_TIMEOUT):
|
timeout=const.DEFAULT_TILLER_TIMEOUT):
|
||||||
'''
|
'''
|
||||||
:params release_name - release name the specified resource is under
|
:param release_name: release name the specified resource is under
|
||||||
:params resource_name - name of specific resource
|
:param resource_name: name of specific resource
|
||||||
:params resource_type - type of resource e.g. job, pod, etc.
|
:param resource_type: type of resource e.g. job, pod, etc.
|
||||||
:params resource_labels - labels by which to identify the resource
|
:param resource_labels: labels by which to identify the resource
|
||||||
:params namespace - namespace of the resource
|
:param namespace: namespace of the resource
|
||||||
|
|
||||||
Apply deletion logic based on type of resource
|
Apply deletion logic based on type of resource
|
||||||
'''
|
'''
|
||||||
|
|
|
@ -45,9 +45,9 @@ class ConfPatcher(fixtures.Fixture):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
"""Constructor
|
"""Constructor
|
||||||
|
|
||||||
:params group: if specified all config options apply to that group.
|
:param group: if specified all config options apply to that group.
|
||||||
|
|
||||||
:params **kwargs: the rest of the kwargs are processed as a
|
:param **kwargs: the rest of the kwargs are processed as a
|
||||||
set of key/value pairs to be set as configuration override.
|
set of key/value pairs to be set as configuration override.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue