Skip to content

Commit

Permalink
MOdified namespace to juniper.device
Browse files Browse the repository at this point in the history
  • Loading branch information
rahkumar651991 committed Jul 9, 2020
1 parent 17cc876 commit ec154ff
Show file tree
Hide file tree
Showing 69 changed files with 49 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apk del -r --purge gcc make g++ &&\
rm -rf /var/cache/apk/* &&\
rm -rf /tmp/*

WORKDIR /etc/ansible/collections/ansible_collections/junipernetworks.devices
WORKDIR /etc/ansible/collections/ansible_collections/juniper.device
COPY action_plugins action_plugins
COPY callback_plugins callback_plugins
COPY library library
Expand Down
4 changes: 2 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Module Name
<!--- Insert, BELOW THIS COMMENT, the name of the module, plugin, task or feature
-->

junipernetworks.devices collection and Python libraries version
juniper.device collection and Python libraries version
<!--- Paste, BELOW THIS COMMENT, verbatim output from "ansible --version" and "pip freeze" between quotes below
Also provide the version of junipernetworks.devices collection-->
Also provide the version of juniper.device collection-->
```
```
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The repo is under active development. If you take a clone, you are getting the

Juniper Networks supports Ansible for managing devices running the Junos operating system (Junos OS).
This collection is hosted on the Ansible Galaxy website under the collection
[junipernetworks.devices](https://galaxy.ansible.com/Juniper/junos/). The junipernetworks.devices collection includes
[juniper.device](https://galaxy.ansible.com/Juniper/junos/). The juniper.device collection includes
a set of Ansible modules that perform specific operational and configuration tasks on devices running Junos OS.
These tasks include:
installing and upgrading Junos OS, provisioning new Junos devices in the network, loading configuration changes,
Expand All @@ -18,7 +18,7 @@ retrieving information, and resetting, rebooting, or shutting down managed devic
## juniper.junos roles by Juniper Networks

Ansible galaxy is upgrading to collections and plans to deprecate roles in future. The master branch will now have
junipernetworks.devices collection support. Juniper.junos roles have been moved to roles branch.
juniper.device collection support. Juniper.junos roles have been moved to roles branch.
For more information for roles, check:
https://github.com/Juniper/ansible-junos-stdlib/tree/roles

Expand All @@ -33,7 +33,7 @@ using the modules in this collection when writing new playbooks that manage Juno

## Overview of Modules

This junipernetworks.devices collection includes the following modules:
This juniper.device collection includes the following modules:

- **juniper_junos_command** — Execute one or more CLI commands on a Junos device.
- **juniper_junos_config** — Manipulate the configuration of a Junos device.
Expand Down Expand Up @@ -100,10 +100,10 @@ In MacOS Mojave and newer (>=10.14), ssh keys created with the system `ssh-keyge
### Ansible Galaxy collection

You can use the ansible-galaxy install command to install the latest
version of the junipernetworks.devices collection.
version of the juniper.device collection.

```bash
sudo ansible-galaxy collection install junipernetworks.devices
sudo ansible-galaxy collection install juniper.device
```

### Git clone
Expand Down Expand Up @@ -167,7 +167,7 @@ This example outlines how to use Ansible to install or upgrade the software imag
- name: Install Junos OS
hosts: dc1
collections:
- junipernetworks.devices
- juniper.device
connection: local
gather_facts: no
vars:
Expand Down Expand Up @@ -211,8 +211,8 @@ Apache 2.0
## SUPPORT
Support for this junipernetworks.devices collection is provided by the community and Juniper Networks. If you have an
issue with a module in the junipernetworks.devices collection, you may:
Support for this juniper.device collection is provided by the community and Juniper Networks. If you have an
issue with a module in the juniper.device collection, you may:
- Open a [GitHub issue](https://github.com/Juniper/ansible-junos-stdlib/issues).
- Post a question on our [Google Group](https://groups.google.com/forum/#!forum/junos-python-ez)
Expand Down
2 changes: 1 addition & 1 deletion ansible-junos-awx/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ endif
.PHONY: docker-exec
docker-exec:
docker exec -it awx_task pip install jsnapy jxmlease junos-eznc
docker exec -it awx_task ansible-galaxy install junipernetworks.devices,$(ANSIBLE_JUNOS_VERSION) -p /etc/ansible/roles
docker exec -it awx_task ansible-galaxy install juniper.junos,$(ANSIBLE_JUNOS_VERSION) -p /etc/ansible/roles
docker exec -it awx_task /bin/bash -c 'sed -i '/roles_path/s/^#//g' /etc/ansible/ansible.cfg'
ifneq '$(HOST_FILE)' ''
curl -u admin:password --noproxy '*' http://localhost/api/v2/inventories/ --header "Content-Type: application/json" -x POST -d '{"name":"$(INVENTORY_NAME)" , "organization": 1}'
Expand Down
12 changes: 6 additions & 6 deletions ansible-junos-awx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ This will do the following operations:
- Clone AWX repository into the Juniper-awx/awx folder
- Change AWX inventory file to include user specifications.Refer [Makefile.variable](#makefilevariable).
- Launch AWX conatiners.
- Install junipernetworks.devices role with user specified version.Refer [Makefile.variable](#makefilevariable).
- Install python modules required for junipernetworks.devices role in awx_task container: jxmlease,junos-eznc,jsnappy.
- Install juniper.junos role with user specified version.Refer [Makefile.variable](#makefilevariable).
- Install python modules required for juniper.junos role in awx_task container: jxmlease,junos-eznc,jsnappy.
- Change roles_path in ansible.cfg for awx_task container.
- If HOST_FILE is mentioned, an inventory with name INVENTORY_NAME is created and host's loaded into it.Refer [Makefile.variable](#makefilevariable).

Expand Down Expand Up @@ -508,11 +508,11 @@ Installing collected packages: lxml, ncclient, scp, pyserial, netaddr, junos-ezn
Successfully installed colorama-0.3.9 configparser-3.5.0 future-0.16.0 icdiff-1.9.1 jsnapy-1.3.1 junos-eznc-2.1.7 jxmlease-1.0.1 lxml-4.1.1 ncclient-0.5.3 netaddr-0.7.19 pyparsing-2.2.0 pyserial-3.4 scp-0.10.2
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
docker exec -it awx_task ansible-galaxy install junipernetworks.devices, -p /etc/ansible/roles
docker exec -it awx_task ansible-galaxy install juniper.junos, -p /etc/ansible/roles
- downloading role 'junos', owned by Juniper
- downloading role from https://github.com/Juniper/ansible-junos-stdlib/archive/2.0.2.tar.gz
- extracting junipernetworks.devices to /etc/ansible/roles/junipernetworks.devices
- junipernetworks.devices (2.0.2) was installed successfully
- extracting juniper.junos to /etc/ansible/roles/juniper.junos
- juniper.junos (2.0.2) was installed successfully
docker exec -it awx_task /bin/bash -c 'sed -i '/roles_path/s/^#//g' /etc/ansible/ansible.cfg'
Expand Down Expand Up @@ -580,7 +580,7 @@ INVENTORY_NAME = Junos
1. `PROJECT_DATA_DIR` : Provide absolute path to directory where the ansible projects reside.If the directory is not present Makefile will create the path.
2. `AWX_TASK_TAG`: Mention the awx_task tag to be installed.For available versions refer [Dockerhub](https://hub.docker.com/r/ansible/awx_task/tags/).
3. `POSTGRES_DATA_DIR`: Provide absolute path to postgres directory.If the directory is not present Makefile will create the path and create folders required for postgres to run.
4. `ANSIBLE_JUNOS_VERSION`: Mention the junipernetworks.devices version to be installed.By default, it installs the latest version.
4. `ANSIBLE_JUNOS_VERSION`: Mention the juniper.junos version to be installed.By default, it installs the latest version.
5. `HOST_FILE`: Provide the absolute path to the host file.This option can be only used if PROJECT_DATA_DIR is mentioned.
By default, it doesnot load any host file.Please ensure that a unique INVENTORY_NAME is mentioned to avoid errors e.g Hosts.
6. `INVENTORY_NAME`: The name of the inventory to which HOST_FILE is to be loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# The namespace of the collection. This can be a company/brand/organization or product namespace under which all
# content lives. May only contain alphanumeric characters and underscores. Additionally namespaces cannot start with
# underscores or numbers and cannot contain consecutive underscores
namespace: junipernetworks
namespace: juniper

# The name of the collection. Has the same character restrictions as 'namespace'
name: devices
name: device

# The version of the collection. Must be compatible with semantic versioning
version: 0.1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Execute single "show version" command.
Expand Down Expand Up @@ -309,7 +309,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Create the module instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Retrieve the committed configuration
juniper_junos_config:
Expand Down Expand Up @@ -738,7 +738,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Choices which are defined in the common module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Gather Junos facts with no configuration
juniper_junos_facts:
Expand Down Expand Up @@ -176,7 +176,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common
from ansible.module_utils._text import to_bytes

def get_facts_dict(junos_module):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: JUNOS Post Checklist
Expand Down Expand Up @@ -208,7 +208,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
JSNAPY_ACTION_CHOICES = ['check', 'snapcheck', 'snap_pre', 'snap_post']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Ping 192.68.1.1 with default parameters. Fails if any packets lost.
Expand Down Expand Up @@ -385,7 +385,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# The argument spec for the module.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Perform PMTUD to 192.68.1.1 with default parameters.
Expand Down Expand Up @@ -247,7 +247,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Constants for MTU size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Execute single get-software-information RPC.
Expand Down Expand Up @@ -246,7 +246,7 @@
- name: Get Device Configuration
hosts: all
collections:
- junipernetworks.devices
- juniper.device
connection: local
gather_facts: no
tasks:
Expand Down Expand Up @@ -375,7 +375,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Create the module instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Execute a basic Junos software upgrade.
Expand Down Expand Up @@ -390,7 +390,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def parse_version_from_filename(filename):
"""Attempts to parse a version string from the filename of a Junos package.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Enable an SRX cluster
juniper_junos_srx_cluster:
Expand Down Expand Up @@ -149,7 +149,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Create the module instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Reboot all REs of the device
Expand Down Expand Up @@ -255,7 +255,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def main():
# Create the module instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: Retrieve LLDP Neighbor Information Using PyEZ-included Table
Expand Down Expand Up @@ -291,7 +291,7 @@

# Ansiballz packages module_utils into ansible.module_utils
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.junipernetworks.devices.plugins.module_utils import juniper_junos_common
from ansible_collections.juniper.device.plugins.module_utils import juniper_junos_common

def expand_items(module, data):
"""Recursively expand any table items
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
#################
- name: Retrieve the committed configuration
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: "TEST 1 - Gather Facts"
juniper_junos_facts:
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_jsnapy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
##################################################
#### TEST 1 ##
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_ping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: "TEST 1 - Ping Host DNS"
juniper_junos_ping:
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_pmtud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device
tasks:
- name: "TEST 1 - Check path MTU to host DNS"
juniper_junos_pmtud:
Expand Down
2 changes: 1 addition & 1 deletion tests/pb.juniper_junos_rpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
connection: local
gather_facts: no
collections:
- junipernetworks.devices
- juniper.device

tasks:
#################
Expand Down

0 comments on commit ec154ff

Please sign in to comment.