Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
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)
Exemplo n.º 4
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)
Exemplo n.º 5
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)
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)
Exemplo n.º 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)
Exemplo n.º 8
0
def list_ports(openstack_resource, query=None):
    """
    List openstack ports based on filters applied
    :param openstack_resource: Instance of current openstack port
    :param kwargs query: Optional query parameters to be sent to limit
            the ports being returned.
    """
    ports = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(PORT_OPENSTACK_TYPE, ports)
Exemplo n.º 9
0
def list_groups(openstack_resource, query=None):
    """
    List openstack groups
    :param openstack_resource: Instance of openstack group.
    :param kwargs query: Optional query parameters to be sent to limit
                                 the resources being returned.
    """
    groups = openstack_resource.list(query)
    add_resource_list_to_runtime_properties(GROUP_OPENSTACK_TYPE, groups)
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)
Exemplo n.º 11
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)
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)
Exemplo n.º 13
0
def list_flavors(openstack_resource, query={}, details=True):
    """

    :param openstack_resource: Instance of openstack flavor resource
    :param kwargs query: Optional query parameters to be sent to limit
                                 the resources being returned.
    :param bool details: When set to ``False``
                :class:`~openstack.compute.v2.flavor.Flavor` instances
                will be returned. The default, ``True``, will cause
                :class:`~openstack.compute.v2.flavor.FlavorDetail`
                instances to be returned.
    """
    query['details'] = details
    flavors = openstack_resource.list(query=query)
    add_resource_list_to_runtime_properties(FLAVOR_OPENSTACK_TYPE, flavors)