Giter Site home page Giter Site logo

aryalogger's People

Contributors

mtimm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aryalogger's Issues

Unsupported query options cause traceback

The following was reported by a user:

Exception happened during processing of request from ('10.1.1.1', 62084)
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 593, in process_request_thread
self.finish_request(request, client_address)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/SimpleAciUiLogServer.py", line 241, in init
client_address, server)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 649, in init
self.handle()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/SimpleAciUiLogServer.py", line 334, in do_POST
response = self.server.dispatch(data['data']['method'], data)
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/SimpleAciUiLogServer.py", line 112, in dispatch
self._dispatch(method, params)
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/SimpleAciUiLogServer.py", line 128, in _dispatch
return func(**params)
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/AryaLogger.py", line 245, in GET
process_get(kwargs['data']['url'])
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/AryaLogger.py", line 210, in process_get
qstring = parse_apic_options_string(purl.query)
File "/Users/user/.virtualenvs/apic_cobra_1.03f/bin/AryaLogger.py", line 186, in parse_apic_options_string
raise ValueError("Unknown REST query option: {0}: {1}".format(opt, value))

ValueError: Unknown REST query option: page-size: ['15']

Test environment is as following
(apic_cobra_1.03f)USER-M-V0RZ:.virtualenvs user$ pip freeze
acicobra===1.0-3f
acimodel===1.0-3f
arya==1.1.2
AryaLogger==1.1.2
requests==2.5.3
SimpleAciUiLogServer==1.1.1

Crash on execution from CLI

Looks like the default for sslport was somehow dropped in a previous commit.

$ aryalogger

+++WARNING+++ Using an embedded self-signed certificate for HTTPS, this is not secure.

Traceback (most recent call last):
  File "/Users/mtimm/.virtualenvs/1.1_1j/bin/aryalogger", line 9, in <module>
    load_entry_point('AryaLogger==1.1.5', 'console_scripts', 'aryalogger')()
  File "/Users/mtimm/.virtualenvs/1.1_1j/lib/python2.7/site-packages/AryaLogger-1.1.5-py2.7.egg/EGG-INFO/scripts/AryaLogger.py", line 436, in main
    start_server(args)
  File "/Users/mtimm/.virtualenvs/1.1_1j/lib/python2.7/site-packages/AryaLogger-1.1.5-py2.7.egg/EGG-INFO/scripts/AryaLogger.py", line 347, in start_server
    excludes=args.exclude)
  File "/Users/mtimm/.virtualenvs/1.1_1j/lib/python2.7/site-packages/SimpleAciUiLogServer-1.1.1-py2.7.egg/EGG-INFO/scripts/SimpleAciUiLogServer.py", line 443, in __init__
    bind_and_activate)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 420, in __init__
    self.server_bind()
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py", line 434, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
TypeError: an integer is required

Fix is forthcoming.

No output from AryaLogger

Symptoms: AryaLogger starts fine and prints out the expected text:

$ AryaLogger

+++WARNING+++ Using an embedded self-signed certificate for HTTPS, this is not secure.

serving at:
http://10.1.2.100:8987/apiinspector
https://10.1.2.100:8443/apiinspector

Make sure your APIC(s) are configured to send log messages: welcome username -> Start Remote Logging
Note: If you connect to your APIC via HTTPS, configure the remote logging to use the https server.

However, when browsing to https://10.1.2.100:8443/apiinspector or http://10.1.2.100:8987/apiinspector there is no response. It is possible to browse to https://localhost:8443/apiinspector or http://localhost:8987/apiinspector and get the proper output but that means that remote users of the AryaLogger server are not able to send log messages to it.

Fix CLI options

Need to tie in cli options for Arya or remove them completely and just generate POST code in a more consistent way.

Fix cobra querystrings and add additional querystring support

Cobra querystrings current print the REST API string instead of the cobra string.

Example:

query.rsp-subtree-include = "health,required"

This should be:

query.subtreeInclude = "health,required"

In addition, the following REST API options need to be added as the dev branch of the github version of cobra supports them:

page
page-size
order-by
replica

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.