def get_ports(cfmclient, switch_uuid=None):
    """
    Get Composable Fabric switch ports.

    :param cfmclient: object of type CFMClient
    :param switch_uuid: switch_uuid: UUID of switch from which to fetch port data
    :return: list of Dictionary objects where each dictionary represents a port on a
    Composable Fabric Module
    :rtype: list
    """
    path='v1/ports'
    if switch_uuid:
        path += '?switches={}&type=access'.format(switch_uuid)

    return cfmclient.get(path).json().get('result')