def METHOD_NAME(args) -> list[OpenStackRC]:
    if args.use_cc_config:
        import ctx
        cfg_factory = ctx.cfg_factory()
        cc_openstack = cfg_factory.ccee(args.credential_profile)
        os_credentials = cc_openstack.credentials()
        openstack_rcs = []
        for os_project in cc_openstack.projects():
            openstack_rcs.append(
                OpenStackRC(
                    project_name=os_project.name(),
                    region=os_project.region(),
                    auth_url=os_project.auth_url(),
                    project_domain=os_project.domain(),
                    user_domain=os_project.domain(),
                    username=os_credentials.username(),
                    password=os_credentials.passwd(),
                )
            )
        return openstack_rcs
    else:
        import os
        os_rc = OpenStackRC(
            project_name=os.getenv("OS_PROJECT_NAME"),
            region=os.getenv("OS_REGION_NAME"),
            auth_url=os.getenv("OS_AUTH_URL"),
            project_domain=os.getenv("OS_PROJECT_DOMAIN_NAME"),
            user_domain=os.getenv("OS_USER_DOMAIN_NAME"),
            username=os.getenv("OS_USERNAME"),
            password=os.getenv("OS_PASSWORD"),
        )
        if os_rc.is_complete():
            return [os_rc]
        else:
            raise RuntimeError(f"no OpenStack credentials found")