'This function will return the number of replicas
based on the results from the defined
openshift.hosted.router.replicas OR
the query from oc_obj on openshift nodes with a selector OR
default to 1'

@staticmethod
def get_router_replicas(replicas=None, router_nodes=None):

    if (replicas is not None):
        return replicas
    replicas = 1
    if (isinstance(router_nodes, dict) and ('results' in router_nodes) and ('results' in router_nodes['results']) and isinstance(router_nodes['results']['results'], list) and (len(router_nodes['results']['results']) > 0) and ('items' in router_nodes['results']['results'][0])):
        if (len(router_nodes['results']['results'][0]['items']) > 0):
            replicas = len(router_nodes['results']['results'][0]['items'])
    return replicas
