Skip to content

Commit

Permalink
Format Slice.add_l2network() docstring to avoid a Sphinx warning
Browse files Browse the repository at this point in the history
This is the warning: "docstring of
fabrictestbed_extensions.fablib.slice.Slice.add_l2network:33:Field
list ends without a blank line; unexpected unindent."

I used M-q with Emacs python-docstring-mode.
  • Loading branch information
sajith committed Jul 2, 2024
1 parent b169e6a commit 0f02e07
Showing 1 changed file with 34 additions and 19 deletions.
53 changes: 34 additions & 19 deletions fabrictestbed_extensions/fablib/slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,36 +923,51 @@ def add_l2network(
L2 networks types include:
- L2Bridge: a local Ethernet on a single site with unlimited interfaces.
- L2STS: a wide-area Ethernet on exactly two sites with unlimited interfaces.
Includes best effort performance and cannot, yet, support Basic NICs
residing on a single physical.
- L2PTP: a wide-area Ethernet on exactly two sites with exactly two interfaces.
QoS performance guarantees (coming soon!). Does not support Basic NICs.
Traffic arrives with VLAN tag and requires the node OS to configure
a VLAN interface.
If the type argument is not set, FABlib will automatically choose the
L2 network type for you. In most cases the automatic network type is
the one you want. You can force a specific network type by setting the
type parameter to "L2Bridge", "L2STS", or "L2PTP".
An exception will be raised if the set interfaces is not compatible
with the specified network type or if there is not compatible network
type for the given interface list.
- L2Bridge: a local Ethernet on a single site with
unlimited interfaces.
- L2STS: a wide-area Ethernet on exactly two sites with
unlimited interfaces. Includes best effort performance
and cannot, yet, support Basic NICs residing on a single
physical.
- L2PTP: a wide-area Ethernet on exactly two sites with
exactly two interfaces. QoS performance guarantees
(coming soon!). Does not support Basic NICs. Traffic
arrives with VLAN tag and requires the node OS to
configure a VLAN interface.
If the type argument is not set, FABlib will automatically
choose the L2 network type for you. In most cases the
automatic network type is the one you want. You can force a
specific network type by setting the type parameter to
"L2Bridge", "L2STS", or "L2PTP".
An exception will be raised if the set interfaces is not
compatible with the specified network type or if there is not
compatible network type for the given interface list.
:param name: the name of the network service
:type name: String
:param interfaces: a list of interfaces to build the network with
:param interfaces: a list of interfaces to build the network
with
:type interfaces: List[Interface]
:param type: optional L2 network type "L2Bridge", "L2STS", or "L2PTP"
:param type: optional L2 network type "L2Bridge", "L2STS", or
"L2PTP"
:type type: String
:param subnet:
:type subnet: ipaddress
:param gateway:
:type gateway: ipaddress
:param user_data
:type user_data: dict
:return: a new L2 network service
:rtype: NetworkService
"""
Expand Down

0 comments on commit 0f02e07

Please sign in to comment.