Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • ConfigFactory ties a subject to its config and config key, and generates Configs. Example: The ConfigFactory for OpticalPortConfig is defined as:

     

    Code Block
    languagejava
    // ConfigFactory<S, C extends Config<S>> 
    new ConfigFactory<ConnectPoint, OpticalPortConfig>(CONNECT_POINT_SUBJECT_FACTORY, OpticalPortConfig.class, "basic") {
    		@Override public OpticalPortConfig createConfig() {
    return new OpticalPortConfig(); 
    } 
    }

     

    indicating that the ConfigFactory can generate OpticalPortConfigs, and the configuration information for a given optical port can be fetched from the subsystem’s manager using its associated subject (a ConnectPoint in this case). In the JSON structure, the key “basic” can be used to fetch out the values set by the OpticalPortConfig.

Syntax

The relationship between the subject, config, subject key, and config key are summarized by the following JSON tree:

Code Block
  {
      subject key 1 : {
          subject 1 : {
              config key : {
                  config fields
              }
          },
          subject 2 : {
            ...
      },
      subject key 2 {
      ...        
  }

where config fields above are key:value entries following the JSON format. Each field in a Config with an attribute accessor is represented by such a key:value pair.

For example, a configuration for a single device might look like the following:

Code Block
  {
     "devices" : {
        "of:0000ffffffffff0a" : {
            "basic": {
                "driver": "linc-oe",
                "type": "ROADM",
                "latitude": 33.8,
                "name": "ATL-S10",
                "longitude": -84.1
            }
        }
     }
  }

 

Using Network Configuration Services

...

...