This module provides a mPlane Software Development Kid (SDK) for Python 3 and contains the mPlane protocol reference implementation. It is intended for the use of component and client developers to interoperate with the mPlane platform. It requires Python 3.3 or greater.
The core classes in the mplane.model
and mplane.scheduler
packages are documented using Sphinx; current Sphinx documentation can be read online here.
The mPlane Protocol provides control and data interchange for passive and active network measurement tasks. It is built around a simple workflow in which Capabilities are published by Components, which can accept Specifications for measurements based on these Capabilities, and provide Results, either inline or via an indirect export mechanism negotiated using the protocol.
Measurement statements are fundamentally based on schemas divided into Parameters, representing information required to run a measurement or query; and Result Columns, the information produced by the measurement or query. Measurement interoperability is provided at the element level; that is, measurements containing the same Parameters and Result Columns are considered to be of the same type and therefore comparable.
To install from PyPI, type:
$ pip3 install mplane-sdk
To install from GitHub type:
$ git clone https://github.com/fp7mplane/protocol-ri
$ cd protocol-ri
$ python3 setup.py install
This section describes how to get started with the mPlane SDK, the included component runtime mpcom
, the debugging client mpcli
, and the demonstration supervisor mpsup
. It presumes that the software is run from the root directory of a working copy of the https://github.com/fp7mplane/protocol-ri Git repository. The demonstration supervisor and the sample configuration files are not installed with the release SDK module.
To start the demonstration Supervisor with the included sample configuration and certificates, change to the repository directory and run:
scripts/mpsup --config ./conf/supervisor.conf
To run the Component:
scripts/mpcom --config ./conf/component.conf
At this point, the Component will automatically register its capabilities to the Supervisor. Now launch the Client:
mpcli --config ./conf/client.conf
As soon as it's launched, the Client connects to the Supervisor and retrieves the capabilities. To get a list of commands available, type help
. The minimum sequence of commands to run a capability and retrieve results is:
listcap
will show all the available capabilities.runcap <name_or_token>
runs a capability from the listcap
list. You will be asked to insert parameter values for that capability.listmeas
shows all pending receipts and received measures.showmeas <name_or_token>
shows the measure (or pending receipt) in detail.While executing these operations, the supervisor and the component will print some status udate messages, giving information about the communications going on.
AttributeError: 'module' object has no attribute 'url'
shows up, try to update the urllib3 library: sudo pip3 install --upgrade urllib3
ssl.CertificateError: hostname '127.0.0.1' doesn't match 'Supervisor-1.SSB.mplane.org'
, try the following steps:
Sample configuration files are located in protocol-ri/conf/
in the mPlane GitHub repository.
[TLS] - paths to the certificate and key of the component, and to the root-ca certificate (or ca-chain) [Roles] - bindings between Distinguished Names (of supervisors and clients) and Roles [Authorizations] - for each capability, there is a list of Roles that are authorized to see that capability [module_] - parameters needed by specific component modules (e.g. ping, tStat, etc). If you don't need a module, remove the related section. If you add a module that needs parameters, add the corresponding section.
[component] - miscellaneous settings:
To be properly set only if component-initiated workflow is selected:
To be properly set only if client-initiated workflow is selected:
[TLS] - paths to the certificate and key of the client, and to the root-ca certificate (or ca-chain) [client] - miscellaneous settings:
To be properly set only if component-initiated workflow is selected:
To be properly set only if client-initiated workflow is selected:
Since the Supervisor is just a composition of component and client, its configuration file is just a union of the file described above. [client] section regards the configuration of the part of the supervisor facing the component, in other words its "client part" [component] section erregards the configuration of the part of the supervisor facing the client, in other words its "component part"
See doc/HOWTO.md in the GitHub repository for information on getting started with the mPlane SDK for demonstration purposes.
See doc/conf.md for an introduction to the mPlane SDK configuration file format.
See doc/client-shell.md for an introduction to mpcli
debug client shell.
See doc/component-dev.md for an introduction to developing components with the mPlane SDK and running them with the mpcom
runtime.
See doc/protocol-spec.md for the mPlane protocol specification.