Giter VIP home page Giter VIP logo

f5er's People

Contributors

cgunning avatar kyrias avatar pr8kerl avatar satchinjoshi avatar trevorlinton avatar

Stargazers

 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

Watchers

 avatar  avatar  avatar

f5er's Issues

401 Unauthorized Error: "Message": "loginProviderName is invalid."

Got the following error when trying to log in:

{
	"Url": "https://[redacted]/mgmt/shared/authn/login",
	"Method": "POST",
	"Params": {},
	"Payload": {
		"loginProviderName": "tmos",
		"password": "[redacted]",
		"username": "[redacted]"
	},
	"RawPayload": false,
	"Result": {
		"token": {
			"token": "",
			"expirationMicros": 0
		}
	},
	"CaptureResponseBody": false,
	"ResponseBody": null,
	"Error": {
		"Message": "loginProviderName is invalid.",
		"Errors": null
	},
	"Userinfo": null,
	"Header": null,
	"Transport": null
}
2017/07/17 15:05:07 --------------------------------------------------------------------------------
2017/07/17 15:05:07 REQUEST
2017/07/17 15:05:07 --------------------------------------------------------------------------------
2017/07/17 15:05:07 Method: GET
2017/07/17 15:05:07 URL: https://[redacted]/mgmt/tm/ltm/virtual
2017/07/17 15:05:07 Header: map[X-F5-Auth-Token:[] Accept:[application/json]]
2017/07/17 15:05:07 Form: map[]
2017/07/17 15:05:07 Payload:
2017/07/17 15:05:07 null
2017/07/17 15:05:07 --------------------------------------------------------------------------------
2017/07/17 15:05:07 RESPONSE
2017/07/17 15:05:07 --------------------------------------------------------------------------------
2017/07/17 15:05:07 Status:  401
2017/07/17 15:05:07 Header:
2017/07/17 15:05:07 {
	"Cache-Control": [
		"no-store, no-cache, must-revalidate"
	],
	"Content-Length": [
		"1515"
	],
	"Content-Security-Policy": [
		"default-src 'self'  'unsafe-inline' 'unsafe-eval'"
	],
	"Content-Type": [
		"application/json"
	],
	"Date": [
		"17 Jul 2017 19:04:55 UTC"
	],
	"Expires": [
		"-1"
	],
	"Pragma": [
		"no-cache"
	],
	"Server": [
		"com.f5.rest.common.RestRequestSender"
	],
	"Strict-Transport-Security": [
		"max-age=16070400; includeSubDomains"
	],
	"X-Content-Type-Options": [
		"nosniff"
	],
	"X-Frame-Options": [
		"SAMEORIGIN"
	],
	"X-Xss-Protection": [
		"1; mode=block"
	]
}
2017/07/17 15:05:07 Body:
2017/07/17 15:05:07 {
	"code": 401,
	"message": "X-F5-Auth-Token does not exist.",
	"referer": "[redacted]",
	"restOperationId": 18365773,
	"errorStack": [
		"java.lang.SecurityException: X-F5-Auth-Token does not exist.",
		"at com.f5.rest.workers.ForwarderWorker.failPermissionValidation(ForwarderWorker.java:686)",
		"at com.f5.rest.workers.ForwarderWorker.evaluatePermission(ForwarderWorker.java:629)",
		"at com.f5.rest.workers.ForwarderPassThroughWorker.onForward(ForwarderPassThroughWorker.java:211)",
		"at com.f5.rest.workers.ForwarderPassThroughWorker.onGet(ForwarderPassThroughWorker.java:418)",
		"at com.f5.rest.common.RestWorker.callDerivedRestMethod(RestWorker.java:1042)",
		"at com.f5.rest.common.RestWorker.callRestMethodHandler(RestWorker.java:1009)",
		"at com.f5.rest.common.RestServer.processQueuedRequests(RestServer.java:1002)",
		"at com.f5.rest.common.RestServer.access$000(RestServer.java:45)",
		"at com.f5.rest.common.RestServer$1.run(RestServer.java:248)",
		"at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)",
		"at java.util.concurrent.FutureTask.run(FutureTask.java:262)",
		"at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)",
		"at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)",
		"at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)",
		"at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)",
		"at java.lang.Thread.run(Thread.java:744)\n"
	]
}
{
	"Status": 401,
	"Message": "X-F5-Auth-Token does not exist."
}
2017/07/17 15:05:07 error: 401 Unauthorised - check your username and passwd

f5er does not honour environment variables.

Despite setting the correct environment variables as per the README, f5er will throw an error unless a config file is present.

ryandraga@kusanagi ~/Revisions/f5er (master) $ export F5_USERNAME="[redacted]"
ryandraga@kusanagi ~/Revisions/f5er (master) $ export F5_PASSWD="[redacted]"
ryandraga@kusanagi ~/Revisions/f5er (master) $ ./f5er

error: no config file found: Config File "f5" Not Found in "[/Users/ryandraga/.f5 /Users/ryandraga/Revisions/f5er]"```

make update

Should it not be "make deps" instead of "make update" ?

All pool members statistics

I would like to get current connections for all pool members. I read the code and don't find any method to get it in one request. So, currently, I must iterate on all pools and get statistics on each.

But with the F5 API, you can get all statistics pool members in one request. You can call this url : /mgmt/tm/ltm/pool/members/stats

This endpoint returns a similar result at /mgmt/tm/ltm/pool/stats but adds some entries that contains member statistics : https://localhost/mgmt/tm/ltm/pool/members/~Common~POOL_NAME/members/stats

json escapes chars in irules when Marshaling

When an iRule contains "&", "<" or ">" it will be escaped by json.Marshal before POST/PUT to the bigip, this makes the request fail due to that the TCL code can't be parsed.

Using some of your code in a derivative project

Hi Ian,

I would like to use some of your code--specifically, the request and response structs--in a derivative project that I'm working on. Per your license, this is okay if I keep your copyright intact and maintain a free license. Are you okay with this if my project is licensed under the MIT license?

I plan on implementing the REST calls myself but copying your structs would save a massive amount of time. Thanks for producing f5er!

Chris

Output not going to stdout

It doesn't look like the output from f5er is going to stdout. I'm trying to parse the output with jq and it won't work unless I redirect stderr to stdout

$ ./f5er -d show device | jq '.Items[] | select(.failoverState == "active") .managementIP'
{
    "selfLink": "https://localhost/mgmt/tm/cm/device?ver=12.0.0",
    "Items": [
        {
            "name": "Unit1",
            "fullPath": "/Common/Unit1",
            "failoverState": "active",
            "managementIP": "192.168.1.11"
        },
        {
            "name": "Unit2",
            "fullPath": "/Common/Unit2",
            "failoverState": "standby",
            "managementIP": "192.168.1.12"
        }
    ]
}
$ ./f5er -d show device 2>&1 | jq -r '.Items[] | select(.failoverState == "active") .managementIP'
192.168.1.11

Using system proxy from env

Sometimes we may need access the F5 through some proxies, shall we support the system proxy from environment variables?

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.