{"id":20074216,"url":"https://github.com/juniper/puppet-netdev-stdlib-junos","last_synced_at":"2025-05-05T21:31:27.809Z","repository":{"id":7491904,"uuid":"8840991","full_name":"Juniper/puppet-netdev-stdlib-junos","owner":"Juniper","description":"Junos specific Provider code for \"netdev_stdlib\".  Netdev is a vendor-neutral network abstraction framework developed by Juniper Networks and contributed freely to the DevOps community.","archived":false,"fork":false,"pushed_at":"2020-07-03T10:09:38.000Z","size":108,"stargazers_count":25,"open_issues_count":6,"forks_count":14,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-17T20:26:28.505Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Juniper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-17T20:21:40.000Z","updated_at":"2020-07-03T10:08:26.000Z","dependencies_parsed_at":"2022-09-14T13:00:21.821Z","dependency_job_id":null,"html_url":"https://github.com/Juniper/puppet-netdev-stdlib-junos","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fpuppet-netdev-stdlib-junos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fpuppet-netdev-stdlib-junos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fpuppet-netdev-stdlib-junos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2Fpuppet-netdev-stdlib-junos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Juniper","download_url":"https://codeload.github.com/Juniper/puppet-netdev-stdlib-junos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252580026,"owners_count":21771252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T14:49:55.425Z","updated_at":"2025-05-05T21:31:27.295Z","avatar_url":"https://github.com/Juniper.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OVERVIEW\n\nNetdev is a vendor-neutral network abstraction framework developed by \nJuniper Networks and contributed freely to the DevOps community\n\nThis module contains the Junos specific Provider code implementing\nthe Resource Types defined in [netdevops/netdev_stdlib](https://github.com/NetdevOps/puppet-netdev-stdlib)\n\n# EXAMPLE USAGE\n\nThis module has been tested against Puppet agent 2.7.19 and 3.6.1.  Here is a short example of a static manifest for a Junos EX switch.  This example assumes that you've also installed the Puppet _stdlib_ module as this example uses the _keys_ function.\n\n~~~~\nnode \"myswitch1234.mycorp.com\" {\n     \n  netdev_device { $hostname: }\n    \n  $vlans = {\n    'Blue'    =\u003e { vlan_id =\u003e 100, description =\u003e \"This is a Blue vlan\" },\n    'Green'   =\u003e { vlan_id =\u003e 101, description =\u003e \"This is a Green vLAN\" },\n    'Purple'  =\u003e { vlan_id =\u003e 102, description =\u003e \"This is a Puple vlan\" },\n    'Red'     =\u003e { vlan_id =\u003e 103, description =\u003e \"This is a Red vlan\" },\n    'Yellow'  =\u003e { vlan_id =\u003e 104, description =\u003e \"This is a Yellow vlan\" }   \n  }\n    \n  create_resources( netdev_vlan, $vlans )\n    \n  $access_ports = [\n    'ge-0/0/0',\n    'ge-0/0/1',\n    'ge-0/0/2'\n  ]\n    \n  $uplink_ports = [\n    'xe-0/0/0',\n    'xe-0/0/2'\n  ]\n      \n  netdev_l2_interface { $access_ports:\n    untagged_vlan =\u003e Blue\n  }\n          \n  netdev_l2_interface { $uplink_ports:\n    tagged_vlans =\u003e keys( $vlans )\n  }\n\n  # service variables passed in template file\n  $services = [ [ 'ftp' ], [ 'ssh' ], [ 'telnet' ], [ 'netconf', 'ssh' ] ]\n\n  netdev_stdlib_junos::apply_group{ \"services_group\":\n    template_path =\u003e \"netdev_stdlib_junos/services.set.erb\",\n    active        =\u003e true,\n    ensure        =\u003e present,\n  }\n  \n  # Syslog variable passed in 'syslog.text.erb' template file\n  $syslog_names = {\n  'messages' =\u003e             [ { 'facility' =\u003e 'any', 'level' =\u003e 'critical' }, { 'facility' =\u003e 'authorization', 'level' =\u003e 'info' } ] ,\n  'interactive-commands' =\u003e [ { 'facility' =\u003e 'interactive-commands', 'level' =\u003e 'error'} ]\n  }\n\n  netdev_stdlib_junos::apply_group{ \"syslog_group\":\n    template_path =\u003e \"netdev_stdlib_junos/syslog.text.erb\",\n    active        =\u003e true,\n    ensure        =\u003e present,\n  }\n  \n  # Event-policy variable passed in 'event-options.xml.erb' template file\n  $policy = {\n            'p1' =\u003e {\n                        'events'       =\u003e [ 'TEST' ],\n                        'action'       =\u003e 'then',\n                        'event-script' =\u003e 'hello.slax'\n                    }\n          }\n  $event_script = [ 'hello.slax' ]\n\n  # file resource copies the file hello.slax from master to agent\n  file { '/var/db/scripts/event/hello.slax':\n    mode =\u003e 0644,\n    source =\u003e \"puppet:///modules/netdev_stdlib_junos/junoscripts/event/hello.slax\",\n  }\n  \n  # Configure event policy and event script\n  netdev_stdlib_junos::apply_group{ \"event_options_group\":\n    template_path =\u003e \"netdev_stdlib_junos/event-options.xml.erb\",\n    active        =\u003e true,\n    ensure        =\u003e present,\n  }  \n}\n~~~~\n  \n# DEPENDENCIES\n\n  * Puppet \u003e= 2.7.19\n  * Ruby Gem netconf 0.2.5\n  * Puppet module netdevops/netdev_stdlib version \u003e= 1.0.0\n  * Junos OS release and jpuppet image by platform:\n    * QFX3500, QFX3600: \n      - JUNOS 12.3X50-D20.1\n      - jpuppet-qfx-1.0R1.1\n    * EX4200, EX4500, EX4550: \n      - JUNOS 12.3R2.5\n      - jpuppet-ex-1.0R1.1 \n    * MX240, MX480, MX960:\n      - JUNOS 12.3R2.5\n      - jpuppet-mx-1.0R1.1\n    * MX5, MX10, MX40, MX80: \n      - JUNOS 12.3R2.5\n      - jpuppet-mx80-1.0R1.1\n    * QFX5100:\n\t  - JUNOS \u003e= 14.2\n\t  - jpuppet-3.6.1_1.junos.i386.tgz\n\t* EX4300\n      - JUNOS \u003e= 14.2\n      - jpuppet-3.6.1_1.junos.powerpc.tgz\n\t  \n# INSTALLATION ON PUPPET-MASTER\n\n  * gem install netconf\n  * puppet module install juniper/netdev_stdlib_junos\n\n# RESOURCE TYPES\n\nSee RESOURCE-STDLIB.md for documentation and usage examples\n\n# CONTRIBUTORS\n\nJuniper Networks is actively contributing to and maintaining this repo. Please contact jnpr-community-netdev@juniper.net for any queries.\n\n*Contributors:*\n\n[Ganesh Nalawade](https://github.com/ganeshnalawade), [Priyal Jain](https://github.com/jainpriyal)\n\n*Former Contributors:*\n\n[Jeremy Schulman](https://github.com/jeremyschulman)\n   \n# LICENSES\n\n   See [LICENSE](https://github.com/Juniper/puppet-netdev-stdlib-junos/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fpuppet-netdev-stdlib-junos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniper%2Fpuppet-netdev-stdlib-junos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fpuppet-netdev-stdlib-junos/lists"}