Git Product home page Git Product logo

Comments (7)

swevm avatar swevm commented on August 22, 2024

If I remember correct, login method and the use of a session key for authentication was a new feature to ease API integration starting with 1.31.

Haven't looked into what it takes to get it working with 1.30. Guess the get and post methods could be get its own version specific for 1.30. That obviously need a way to identify version of API when accessing it which do not exist to my knowledge. It's possible to get SIO version after login but not before.

from scaleio-py.

wallnerryan avatar wallnerryan commented on August 22, 2024

Yeah, I think all 1.30 needs is the basic auth, no token or login.

Here's one way I was thinking. We could add a version flag to the scaleio.ScaleIO to easily identify intent to use a version, we could default to 1.31or allow an identifying function to process strings of "1.31, 131, 1.3.1" to or somthing and set the classifier of somthing like 1_30="1.30"

The tougher part is deciding what to do with the flow of initialization. E.g. ScaleIO calls _check_login() and _login() a lot, and we would need to not "actually" login if the 1.30 flag is set or something. One thought is we would still need to check if the user/pass is valid, maybe we could do this by accessing an arbitrary URL like api/Configuration that needs user/pass and see if it fails? We also wouldn't need to set the new token in the auth_token if it doesn't utilize it.

Just some thoughts, still looking into the best way to do this. I will be looking to help out with this soon to gain 1.30 support for the driver that utilizes scaleiopy.

from scaleio-py.

wallnerryan avatar wallnerryan commented on August 22, 2024

Or possibly, idk if you need to login for version, as long as username/password is correct, we could use the version to verify if its 1.30 vs 1.31?

This is against a 1.30 (without login)

(venv)[root@sclr059]#curl -k --basic --user admin:Scaleio123 https://10.13.217.59:443/api/version
"1.0"

This is against a 1.31 (without login)

[vagrant@tb]$ curl -k --basic --user admin:Scaleio123 https://192.168.50.12:443/api/version
"1.1"

from scaleio-py.

swevm avatar swevm commented on August 22, 2024

Nice find. It's also
Possible to set what version ScaleIO should use to respond to requests by setting http header. It's used at some place but need to
Be overhauled.
I have started looking at how to make use of some New 1.32 features so I have to implement API version checking anyway.

from scaleio-py.

wallnerryan avatar wallnerryan commented on August 22, 2024

So you use this already? So its possible to set ScaleIO to use a specific version of the API?

Also, 2 things, do you think its possible to cut a release before adding any 1.30 or 1.32 support ? E.g. with current feature sets. I will want to refer to this version soon. And when you do the work for 1.32 could we make a separate branch for now? I could do the same for 1.30 work?

from scaleio-py.

swevm avatar swevm commented on August 22, 2024

I won´t add any 1.32 stuff before a new release which should be soon. Have some time constraints atm. Need to merge the pieces in v-tree branch and add a minor adjustment to IM class to support configuring syslog during installation and then I´ll create a release out of it.

Optimally I´d like to be able to identify protocol version and adopt to it. how come you need 1.30 support? 1.31 do everything that 1.30 do but better.

from scaleio-py.

wallnerryan avatar wallnerryan commented on August 22, 2024

Sounds Good,

Do you estimate when you'd be able to? Ultimately pip installable releases would be nice too, I know as you mentioned its future roadmap.

Agreed, but just for compatibility reasons

from scaleio-py.

Related Issues (14)

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.