{"id":16895758,"url":"https://github.com/ytti/oxidized-script","last_synced_at":"2025-04-06T06:09:11.692Z","repository":{"id":15982352,"uuid":"18725366","full_name":"ytti/oxidized-script","owner":"ytti","description":"CLI and LIB for scripting network devices via Oxidized","archived":false,"fork":false,"pushed_at":"2023-04-24T17:18:10.000Z","size":59,"stargazers_count":41,"open_issues_count":22,"forks_count":24,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-04-26T07:40:56.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ytti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-13T09:03:23.000Z","updated_at":"2024-06-19T03:56:33.455Z","dependencies_parsed_at":"2024-06-19T04:12:42.818Z","dependency_job_id":null,"html_url":"https://github.com/ytti/oxidized-script","commit_stats":{"total_commits":57,"total_committers":14,"mean_commits":4.071428571428571,"dds":0.4736842105263158,"last_synced_commit":"988cded5d89f52e274afb545bd3e011e19d5d22d"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ytti%2Foxidized-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ytti","download_url":"https://codeload.github.com/ytti/oxidized-script/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441052,"owners_count":20939239,"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-10-13T17:25:55.550Z","updated_at":"2025-04-06T06:09:11.663Z","avatar_url":"https://github.com/ytti.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oxidized Script\nCLI and Library to interface with network devices in Oxidized\n\n## Install\n % gem install oxidized-script\n\n## Use\n\n### CLI\n```\n[fisakytt@lan-login1 ~]% oxs S-2250220 'sh ver'\n                Jan 29 2010 12:18:24\n                K.14.54\n                79\n[fisakytt@lan-login1 ~]% cat \u003e cmds\nshow ip route\n[fisakytt@lan-login1 ~]% oxs -x cmds 62.236.123.199\nDefault gateway is 62.236.123.198\n\nHost               Gateway           Last Use    Total Uses  Interface\nICMP redirect cache is empty\n[fisakytt@lan-login1 ~]% cat \u003e\u003e cmds\nsh ip cef\n[fisakytt@lan-login1 ~]% cat cmds|oxs -x- 62.236.123.199\nDefault gateway is 62.236.123.198\n\nHost               Gateway           Last Use    Total Uses  Interface\nICMP redirect cache is empty\n%IPv4 CEF not running\n\n[nertwork@lan-login2 ~]% oxs --verbose --group ios --threads 4 --regex ^test 'show vrf'\nrunning list for hosts in group: ios and matching: ^test\n## HOST - test-node-1\n## OXS - show vrf\nName                             Default RD          Protocols   Interfaces\n  mgmtVRF                          \u003cnot set\u003e           ipv4,ipv6   Fa1\n\n[fisakytt@lan-login1 ~]% oxs --help\nUsage: oxs [options] hostname [command]\n    -m, --model            host model (ios, junos, etc), otherwise discovered from Oxidized source\n    -o, --ostype           OS Type (ios, junos, etc)\n    -x, --commands         commands file to be sent\n    -u, --username         username to use\n    -p, --password         password to use\n    -t, --timeout          timeout value to use\n    -e, --enable           enable password to use\n    -c, --community        snmp community to use for discovery\n    -g, --group            group to run commands on (ios, junos, etc), specified in oxidized db\n    -r, --threads          specify ammount of threads to use for running group (default: 1)\n        --regex            run on all hosts that match the regexp\n        --dryrun           do a dry run on either groups or regexp to find matching hosts\n        --protocols        protocols to use, default \"ssh, telnet\"\n    -v, --verbose          verbose output, e.g. show commands sent\n    -d, --debug            turn on debugging\n        --terse            display clean output\n        --list-models      list supported models\n        --list-nodes       list nodes in oxidized source\n    -h, --help             Display this help message.\n[fisakytt@lan-login1 ~]% \n\n\n```\n\n### Library\n```\n[fisakytt@lan-login1 ~]% cat moi42.b \n#!/usr/bin/env ruby\n\nrequire 'oxidized/script'\n\nOxidized::Config.load\nOxidized.setup_logger\n\nOxidized::Script.new(:host=\u003e'62.236.123.199') do |oxs|\n  puts oxs.cmd 'show mac address-table dynamic vlan 101'\nend\n[fisakytt@lan-login1 ~]% ./moi42.b \n          Mac Address Table\n-------------------------------------------\n\nVlan    Mac Address       Type        Ports\n----    -----------       --------    -----\n 101    44d3.ca4c.383e    DYNAMIC     Gi0/1\n[fisakytt@lan-login1 ~]% \n```\n\n## TODO\n  * Interactive use?\n  * Tests+docs, as always :(\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytti%2Foxidized-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fytti%2Foxidized-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fytti%2Foxidized-script/lists"}