Merge pull request #61 from dbarrosop/0.2

0.2
This commit is contained in:
Elisa Jasinska committed 2015-10-01 13:09:47 +02:00
commit 82793b1380
4 files changed
+73 -7

No files matched your search

+2
View File
@@ -54,3 +54,5 @@ docs/_build/
.idea
.DS_Store
env
+66
View File
@@ -0,0 +1,66 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014 Spotify AB. All rights reserved.
#
# The contents of this file are licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
"""
"""
import ast
import logging
logger = logging.getLogger('eos_install_config')
DOCUMENTATION = '''
'''
EXAMPLES = '''
'''
def main():
module = AnsibleModule(
argument_spec=dict(
hostname=dict(required=True),
username=dict(required=True),
password=dict(required=True),
dev_os=dict(required=True),
),
supports_check_mode=True
)
hostname = module.params['hostname']
username = module.params['username']
dev_os = module.params['dev_os']
password = module.params['password']
network_driver = get_network_driver(dev_os)
device = network_driver(hostname, username, password)
device.open()
facts = device.get_facts()
facts['interface_details'] = device.get_interfaces()
device.close()
module.exit_json(ansible_facts=facts)
from ansible.module_utils.basic import *
from napalm import get_network_driver
main()
+1 -1
View File
@@ -209,4 +209,4 @@ class FortiOSDriver(NetworkDriver):
# }
def get_lldp_neighbors(self):
return {}
return {}
+4 -6
View File
@@ -1,7 +1,7 @@
---
####
#### Interface table
#### Interface table
####
junos_iface_table:
@@ -18,7 +18,7 @@ junos_iface_view:
is_enabled: { admin-status: True=up }
description: description
last_flapped: { interface-flapped/@seconds: int }
mode: logical-interface/address-family/address-family-name
#mode: logical-interface/address-family/address-family-name
speed: speed
mac_address: current-physical-address
@@ -27,7 +27,7 @@ junos_iface_view:
####
junos_route_instance_table:
rpc: get-instance-information
rpc: get-instance-information
item: instance-core
key: instance-name
view: junos_route_instance_view
@@ -54,7 +54,7 @@ junos_bgp_view:
sent_prefixes: { bgp-rib/aadvertised-prefix-count: int }
####
#### LLDP table
#### LLDP table
####
junos_lldp_table:
@@ -67,5 +67,3 @@ junos_lldp_view:
fields:
hostname: lldp-remote-system-name
port: lldp-remote-port-description | lldp-remote-port-id