Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Openswitch to Libreswitch #27971

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/BOTMETA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ files:
$modules/network/netvisor/: $team_netvisor
$modules/network/nuage/: pdellaert
$modules/network/nxos/: $team_nxos
$modules/network/openswitch/: $team_openswitch
$modules/network/libreswitch/: $team_libreswitch
$modules/network/openvswitch/:
ignored: stygstra
maintainers: $team_networking
Expand All @@ -478,7 +478,7 @@ files:
$modules/network/panos/panos_address.py: itdependsnetworks ivanbojer jtschichold
$modules/network/protocol/: $team_networking
$modules/network/routing/: $team_networking
$modules/network/sros/: $team_openswitch
$modules/network/sros/: $team_libreswitch
$modules/network/system/: $team_networking
$modules/network/vyos/: Qalthos
$modules/notification/bearychat.py: tonyseek
Expand Down Expand Up @@ -1060,7 +1060,7 @@ macros:
team_networking: Qalthos ganeshrn gundalow privateip rcarrillocruz trishnaguha
team_nxos: GGabriele jedelman8 mikewiebe privateip rahushen rcarrillocruz trishnaguha
team_openstack: emonty j2sol juliakreger rcarrillocruz shrews thingee
team_openswitch: Qalthos gundalow privateip
team_libreswitch: Qalthos gundalow privateip
team_rabbitmq: chrishoffman manuel-sousa romanek-adam
team_rhn: alikins barnabycourt flossware vritant
team_tower: ghjm jlaska matburt wwitzel3
Expand Down
2 changes: 1 addition & 1 deletion docs/docsite/rst/dev_guide/developing_module_utilities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The following is a list of module_utils files and a general description. The mod
- network.py - Functions for running commands on networking devices
- nxos.py - Contains definitions and helper functions specific to Cisco NXOS networking devices
- openstack.py - Utilities for modules that work with Openstack instances.
- openswitch.py - Definitions and helper functions for modules that manage OpenSwitch devices
- libreswitch.py - Definitions and helper functions for modules that manage libreswitch devices
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list should be in alphabetical order.

- powershell.ps1 - Utilities for working with Microsoft Windows clients
- pure.py - Functions and utilities for modules that work with the Pure Storage storage platforms.
- pycompat24.py - Exception workaround for Python 2.4.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
module: ops_command
version_added: "2.1"
author: "Peter Sprygada (@privateip)"
short_description: Run arbitrary commands on OpenSwitch devices.
short_description: Run arbitrary commands on LibreSwitch devices.
description:
- Sends arbitrary commands to an OpenSwitch node and returns the results
- Sends arbitrary commands to an LibreSwitch node and returns the results
read from the device. This module includes an
argument that will cause the module to wait for a specific condition
before returning or timing out if the condition is not met.
extends_documentation_fragment: openswitch
extends_documentation_fragment: libreswitch
options:
commands:
description:
Expand Down Expand Up @@ -95,7 +95,7 @@
commands:
- show version
wait_for:
- "result[0] contains OpenSwitch"
- "result[0] contains LibreSwitch"
provider: "{{ cli }}"

- ops_command:
Expand Down Expand Up @@ -126,7 +126,7 @@
"""
import traceback

import ansible.module_utils.openswitch
import ansible.module_utils.libreswitch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too keep compatibility for those using the old name of the lib, this should be a try/except Import with fallback to the old name.

from ansible.module_utils.netcli import CommandRunner
from ansible.module_utils.netcli import AddCommandError, FailedConditionsError
from ansible.module_utils.network import NetworkModule, NetworkError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
module: ops_config
version_added: "2.1"
author: "Peter Sprygada (@privateip)"
short_description: Manage OpenSwitch configuration using CLI
short_description: Manage LibreSwitch configuration using CLI
description:
- OpenSwitch configurations use a simple block indent file syntax
- LibreSwitch configurations use a simple block indent file syntax
for segmenting configuration into sections. This module provides
an implementation for working with ops configuration sections in
a deterministic way.
extends_documentation_fragment: openswitch
extends_documentation_fragment: libreswitch
options:
lines:
description:
Expand Down Expand Up @@ -175,7 +175,7 @@
"""
import traceback

from ansible.module_utils.openswitch import NetworkModule, NetworkError
from ansible.module_utils.libreswitch import NetworkModule, NetworkError
from ansible.module_utils.netcfg import NetworkConfig, dumps
from ansible.module_utils._text import to_native

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
module: ops_facts
version_added: "2.1"
author: "Peter Sprygada (@privateip)"
short_description: Collect device specific facts from OpenSwitch
short_description: Collect device specific facts from LibreSwitch
description:
- Collects facts from devices running the OpenSwitch operating
- Collects facts from devices running the LibreSwitch operating
system. Fact collection is supported over both Cli and Rest
transports. This module prepends all of the base network fact keys
with C(ansible_net_<fact>). The facts module will always collect a
Expand All @@ -29,7 +29,7 @@
are collected for backwards compatibility; however, these facts
should be considered deprecated and will be removed in a future
release.
extends_documentation_fragment: openswitch
extends_documentation_fragment: libreswitch
options:
config:
description:
Expand Down Expand Up @@ -158,7 +158,7 @@
type: string
sample: ops01
version:
description: The current version of OpenSwitch
description: The current version of LibreSwitch
returned: always
type: string
sample: '0.3.0'
Expand All @@ -170,7 +170,7 @@
"""
import re

import ansible.module_utils.openswitch
import ansible.module_utils.libreswitch
from ansible.module_utils.netcli import CommandRunner, AddCommandError
from ansible.module_utils.network import NetworkModule
from ansible.module_utils.six import iteritems
Expand Down Expand Up @@ -229,7 +229,7 @@ def cli(self):
self.facts['hostname'] = self.runner.get_command('show hostname')

def parse_version(self, data):
match = re.search(r'OpenSwitch Version\s+: (\S+)', data)
match = re.search(r'LibreSwitch Version\s+: (\S+)', data)
if match:
return match.group(1)

Expand Down Expand Up @@ -291,7 +291,7 @@ def cli(self):
self.facts['_config'] = self.runner.get_command('show running-config')

def parse_version(self, data):
match = re.search(r'OpenSwitch Version\s+: (\S+)', data)
match = re.search(r'LibreSwitch Version\s+: (\S+)', data)
if match:
return match.group(1)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class ModuleDocFragment(object):
choices: ['yes', 'no']
provider:
description:
- Convenience method that allows all I(openswitch) arguments to be passed as
- Convenience method that allows all I(libreswitch) arguments to be passed as
a dict object. All constraints (required, choices, etc) must be
met either by individual arguments or values in this dict.
required: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- show version
- show interface eth1
wait_for:
- "result[0] contains OpenSwitch"
- "result[0] contains libreswitch"
- "result[1] contains 'Interface eth1'"
provider: "{{ cli }}"
register: result
Expand Down
6 changes: 3 additions & 3 deletions test/sanity/pep8/legacy-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ lib/ansible/modules/network/nxos/nxos_vtp_domain.py
lib/ansible/modules/network/nxos/nxos_vtp_password.py
lib/ansible/modules/network/nxos/nxos_vtp_version.py
lib/ansible/modules/net_tools/omapi_host.py
lib/ansible/modules/network/openswitch/ops_command.py
lib/ansible/modules/network/openswitch/ops_config.py
lib/ansible/modules/network/openswitch/ops_facts.py
lib/ansible/modules/network/libreswitch/ops_command.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alphabetical order

lib/ansible/modules/network/libreswitch/ops_config.py
lib/ansible/modules/network/libreswitch/ops_facts.py
lib/ansible/modules/network/ordnance/ordnance_config.py
lib/ansible/modules/network/ordnance/ordnance_facts.py
lib/ansible/modules/network/ovs/openvswitch_bridge.py
Expand Down
2 changes: 1 addition & 1 deletion test/sanity/validate-modules/module_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
'ansible.module_utils.ios.NetworkModule',
'ansible.module_utils.iosxr.NetworkModule',
'ansible.module_utils.junos.NetworkModule',
'ansible.module_utils.openswitch.NetworkModule',
'ansible.module_utils.libreswitch.NetworkModule',
]


Expand Down