예제 #1
0
def list_keypairs(openstack_resource):
    """
    List openstack keypairs
    :param openstack_resource: Instance of openstack keypair.
    """
    keypairs = openstack_resource.list()
    add_resource_list_to_runtime_properties(KEYPAIR_OPENSTACK_TYPE, keypairs)
예제 #2
0
def list_aggregates(openstack_resource):
    """
    List openstack host aggregate
    :param openstack_resource: Instance of openstack host aggregate resource.
    """
    aggregates = openstack_resource.list()
    add_resource_list_to_runtime_properties(HOST_AGGREGATE_OPENSTACK_TYPE,
                                            aggregates)
예제 #3
0
def list_server_groups(openstack_resource, query=None):
    """
    List openstack server groups
    :param openstack_resource: Instance of openstack sever group.
    """
    server_groups = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(SERVER_GROUP_OPENSTACK_TYPE,
                                            server_groups)
def list_networks(openstack_resource, query=None):
    """
    List openstack networks based on filters applied
    :param openstack_resource: Instance of current openstack network
    :param kwargs query: Optional query parameters to be sent to limit
            the networks being returned.
    """
    networks = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(NETWORK_OPENSTACK_TYPE, networks)
예제 #5
0
def list_projects(openstack_resource, query=None):
    """
    List openstack projects
    :param openstack_resource: Instance of openstack project.
    :param kwargs query: Optional query parameters to be sent to limit
                                 the resources being returned.
    """
    projects = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(PROJECT_OPENSTACK_TYPE, projects)
예제 #6
0
def list_users(openstack_resource, query=None):
    """
    List openstack users
    :param openstack_resource: Instance of openstack user.
    :param kwargs query: Optional query parameters to be sent to limit
                                 the resources being returned.
    """
    users = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(USER_OPENSTACK_TYPE, users)
예제 #7
0
def list_volumes(openstack_resource, query=None):
    """
    List openstack volumes based on filters applied
    :param openstack_resource: Instance of current openstack volume
    :param kwargs query: Optional query parameters to be sent to limit
            the volumes being returned.
    """
    volumes = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(VOLUME_OPENSTACK_TYPE, volumes)
def list_routers(openstack_resource, query=None):
    """
    List openstack routers based on filters applied
    :param openstack_resource: Instance of current openstack router
    :param kwargs query: Optional query parameters to be sent to limit
            the routers being returned.
    """
    routers = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(ROUTER_OPENSTACK_TYPE, routers)
예제 #9
0
def list_floating_ips(openstack_resource, query=None):
    """
    List openstack floating ips based on filters applied
    :param openstack_resource: Instance of current openstack floating ip
    :param kwargs query: Optional query parameters to be sent to limit
            the floating ips being returned.
    """
    floating_ips = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(FLOATING_IP_OPENSTACK_TYPE,
                                            floating_ips)
예제 #10
0
def list_flavors(openstack_resource, query=None, details=True):
    """

    :param openstack_resource:
    :param query:
    :param details:
    :return:
    """
    flavors = openstack_resource.list(details=details, query=query)
    add_resource_list_to_runtime_properties(FLAVOR_OPENSTACK_TYPE, flavors)
예제 #11
0
def list_security_groups(openstack_resource, query=None):
    """
    List openstack security groups based on filters applied
    :param openstack_resource: Instance of current openstack security group
    :param kwargs query: Optional query parameters to be sent to limit
            the security groups being returned.
    """

    security_groups = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(SECURITY_GROUP_OPENSTACK_TYPE,
                                            security_groups)
예제 #12
0
def list_rbac_policies(openstack_resource, query=None):
    """
    List openstack rbac policies based on filters applied
    :param openstack_resource: Instance of current openstack rbac policy
    :param kwargs query: Optional query parameters to be sent to limit
            the rbac policies being returned.
    """

    rbac_policies = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(RBAC_POLICY_OPENSTACK_TYPE,
                                            rbac_policies)