Skip to content

Latest commit

 

History

History
99 lines (62 loc) · 2.71 KB

catalog_source.md

File metadata and controls

99 lines (62 loc) · 2.71 KB

CatalogSource

Auto-generated documentation for ocs_ci.ocs.resources.catalog_source module.

CatalogSource related functionalities

CatalogSource

[find in source code]

class CatalogSource(OCP):
    def __init__(resource_name='', namespace=None, *args, **kwargs):

This class represent CatalogSource and contains all related methods we need to do with it.

See also

CatalogSource().check_state

[find in source code]

def check_state(state):

Check state of catalog source

Arguments

  • state str - State of CatalogSource object

Returns

  • bool - True if state of object is the same as desired one, False otherwise.

CatalogSource().get_image_name

[find in source code]

def get_image_name():

Fetch image name from catalog source resource

Returns

image info (str): especially version info extracted from image name

CatalogSource().get_image_url

[find in source code]

def get_image_url():

Fetch image url from catalog source resource

Returns

image url (str): URL of image

CatalogSource().wait_for_state

[find in source code]

@retry(ResourceInUnexpectedState, tries=4, delay=5, backoff=1)
def wait_for_state(state, timeout=480, sleep=5):

Wait till state of catalog source resource is the same as required one passed in the state parameter.

Arguments

  • state str - Desired state of catalog source object
  • timeout int - Timeout in seconds to wait for desired state
  • sleep int - Time in seconds to sleep between attempts

Raises

  • ResourceInUnexpectedState - In case the catalog source is not in expected state.