示例#1
0
def update_nodes():
    """Update the Resource graph's Glance nodes and edges from the current
    OpenStack cloud state.

    Glance nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import Image
    from goldstone.core.utils import process_resource_type

    process_resource_type(Image)
示例#2
0
def update_nodes():
    """Update the Resource graph's Keystone nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import User, Project, Group, Domain, Region, \
        Endpoint, Service, Role
    from goldstone.core.utils import process_resource_type

    for entry in [Domain, Project, Group, User, Region, Endpoint, Service,
                  Role]:
        process_resource_type(entry)
示例#3
0
def update_nodes():
    """Update the Resource graph's Keystone nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import User, Project, Group, Domain, Region, \
        Endpoint, Service, Role
    from goldstone.core.utils import process_resource_type

    for entry in [
            Domain, Project, Group, User, Region, Endpoint, Service, Role
    ]:
        process_resource_type(entry)
示例#4
0
def update_nodes():
    """Update the Resource graph's Cinder nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import QOSSpec, VolumeType, Snapshot, Transfer
    from goldstone.core.utils import process_resource_type

    # The resource type "from" nodes.
    FROM_TYPES = [QOSSpec, VolumeType, Snapshot, Transfer]

    for nodetype in FROM_TYPES:
        process_resource_type(nodetype)
示例#5
0
def update_nodes():
    """Update the Resource graph's Nova nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import AvailabilityZone, Host, Cloudpipe, \
        Server, Flavor, Hypervisor, Interface, Keypair
    from goldstone.core.utils import process_resource_type

    # The resource type "from" nodes.
    FROM_TYPES = [AvailabilityZone, Cloudpipe, Flavor, Host, Hypervisor,
                  Interface, Keypair, Server]

    for nodetype in FROM_TYPES:
        process_resource_type(nodetype)
示例#6
0
def update_nodes():
    """Update the Resource graph's Neutron nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import (
        NeutronAgent,
        NeutronExtension,
        NeutronSubnetPool,
        NeutronRouter,
        NeutronNetwork,
        NeutronSubnet,
        NeutronFloatingIP,
        NeutronPort,
        NeutronSecurityGroup,
        NeutronQuota,
        NeutronSecurityGroupRule,
    )

    from goldstone.core.utils import process_resource_type

    for entry in [
        NeutronAgent,
        NeutronExtension,
        NeutronSubnetPool,
        NeutronRouter,
        NeutronNetwork,
        NeutronSubnet,
        NeutronFloatingIP,
        NeutronPort,
        NeutronSecurityGroup,
        NeutronQuota,
        NeutronSecurityGroupRule,
    ]:
        process_resource_type(entry)
示例#7
0
def update_nodes():
    """Update the Resource graph's Neutron nodes and edges from the current
    OpenStack cloud state.

    Nodes are:
       - deleted if they are no longer in the OpenStack cloud.
       - added if they are in the OpenStack cloud, but not in the graph.
       - updated from the cloud if they are already in the graph.

    """
    from goldstone.core.models import NeutronAgent, NeutronExtension, \
        NeutronSubnetPool, NeutronRouter, NeutronNetwork, NeutronSubnet, \
        NeutronFloatingIP, NeutronPort, NeutronSecurityGroup, NeutronQuota, \
        NeutronSecurityGroupRule

    from goldstone.core.utils import process_resource_type

    for entry in [NeutronAgent, NeutronExtension, NeutronSubnetPool,
                  NeutronRouter, NeutronNetwork, NeutronSubnet,
                  NeutronFloatingIP, NeutronPort, NeutronSecurityGroup,
                  NeutronQuota, NeutronSecurityGroupRule]:
        process_resource_type(entry)