Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1_get_project_instances returns wrong results #2

Open
jbmcfarlin31 opened this issue May 16, 2024 · 0 comments
Open

v1_get_project_instances returns wrong results #2

jbmcfarlin31 opened this issue May 16, 2024 · 0 comments

Comments

@jbmcfarlin31
Copy link

Description

I am trying to port over some of our existing codebase to this new SDK and am having issues with accurate responses returning from some of the function calls.

Corellium SDK version installed via pip: corellium-api==0.3.2

I followed the instructions in the README file. This is my code that is reproducing the error:

import asyncio
import corellium_api

config = corellium_api.Configuration(
    host="https://myredacteddomain.corellium.com", # redacted for security reasons
)

config.access_token = "some_access_token"


async def main():
    async with corellium_api.ApiClient(config) as api:
        client = corellium_api.CorelliumApi(api)
        instances = await client.v1_get_project_instances(
            "<some_project_id>"
        )
        print(len(instances))
        print(instances[0].__dict__)

if __name__ == "__main__":
    asyncio.run(main())

This does not error however, the results/output is not correct. I know that the project ID that I provided has 0 instances in it and yet the len(instances) returns with 1505 items in the instances array.

If I look at the first element (and all for that matter) I can see the following:

{'local_vars_configuration': <corellium_api.configuration.Configuration object at 0x107003910>, '_id': None, '_name': None, '_key': None, '_flavor': None, '_type': None, '_project': None, '_state': None, '_state_changed': None, '_started_at': None, '_user_task': None, '_task_state': None, '_error': None, '_boot_options': None, '_service_ip': None, '_wifi_ip': None, '_secondary_ip': None, '_services': None, '_panicked': None, '_created': None, '_model': None, '_fwpackage': None, '_os': None, '_agent': None, '_netmon': None, '_netdump': None, '_expose_port': None, '_fault': None, '_patches': None, '_created_by': None, 'discriminator': None}

I would have expected this to show an empty array list, since there are no instances in this project.

When I use the previous client here, it works without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant