vitrage/doc/source/static-physical-config.rst
Tovin Seven e2b21d516d Beautify, correct URLs in documentation files
- Beautify, re-indent, format code in a lot of doc files
- Use relative URLs instead of absolute github URLs
- Some absolute github urls are not corrected yet:
    + URL for enabling vitrage in devstack
    + URL for enabling vitrage in horizon
- Update year number in doc/source/config.py from 2013 to 2016

My thought: We should have a blueprint
    to create more concise and easy to access like other project
    (nova: http://docs.openstack.org/developer/nova/).
    Currently, that site for vitrage has not existed yet.

Notes: Change github URLs to relative URLs
    (or absolute URLs in docs.openstack.org/developers)
    will not work correctly
    if we do not have official documentation site.
    Hence, other people cannot follow the link to html page
    if they read vitrage documentation in github mirror.

Change-Id: Ifff8355c7e5291f68a7592d1617644053d790d5e
2016-11-18 04:34:55 +00:00

3.4 KiB

Static Physical Datasource Configuration

Overview

The Static Physical datasource allows users to integrate the physical topology into Vitrage. Physical topology includes switches and their connection to other switches and physical hosts.

This datasource is static - pre-configured in a file. This is sufficient in many cases where the physical topology is relatively unchanging.

Configure Access to Static Physical

The following should be set in /etc/vitrage/vitrage.conf, under [static_physical] section:

Name Description Default Value
directory Directory path from where to load the configurations /etc/vitrage/static_datasources/
changes_interval Interval of checking changes in the configuration files 30 seconds
entities Static physical entity types list switch

Configure Static Physical Mapping

Physical configuration is made for configuring statically physical entities, and their relationships to other entities in the topology.

Some physical entities, such as switches, can not be retrieved from OpenStack, and so are defined here.

There may be more than one configuration file. All files will be read from /etc/vitrage/static_datasources/. See previous section on how to configure this location.

Format

entities:
  - name: <Physical entity name as appears in configuration>
    id: <Physical entity id as appears in configuration>
    type: <Physical entity type - see below for details>
    state: <default resource state>
    relationships:
      - type: <Physical entity type it is connected to - see below for details>
        name: <Name of physical entity as appears in configuration>
        id: <Id of physical entity as appears in configuration>
        relation_type: <Relation name>
      - type: ...
...
Notes:
  • The "type" key must match the name of a type from an existing datasource.
  • Type names appear, for each datasource, in its __init__.py file.
  • For example see /workspace/dev/vitrage/vitrage/datasources/nova/host/__init__.py

Example

The following will define a switch that is attached to host-1 and is a backup of switch-2

entities:
  - type: switch
    name: switch-1
    id: switch-1 # should be same as name
    state: available
    relationships:
      - type: nova.host
        name: host-1
        id: host-1 # should be same as name
        relation_type: attached
      - type: switch
        name: switch-2
        id: switch-2 # should be same as name
        relation_type: backup