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

vcsim: Failed to get Firmware Config Upload URL #866

Closed
Akasurde opened this issue Oct 8, 2017 · 5 comments
Closed

vcsim: Failed to get Firmware Config Upload URL #866

Akasurde opened this issue Oct 8, 2017 · 5 comments

Comments

@Akasurde
Copy link
Contributor

Akasurde commented Oct 8, 2017

as $title, I am unable to get Fireware Config Upload URL using

firmwareSystem.QueryFirmwareConfigUploadURL() method

Reproducer ::

#!/usr/bin/env python
from pyVim import connect
from pyVmomi import vim


def get_obj(content, vimtype, name):
    """
    Return an object by name, if name is None the
    first found object is returned
    """
    obj = None
    container = content.viewManager.CreateContainerView(
        content.rootFolder, vimtype, True)
    for c in container.view:
        if name:
            if c.name == name:
                obj = c
                break
        else:
            obj = c
            break

    return obj

def main():
    # start vcsim ...
    # sudo ~/go/bin/vcsim -trace -httptest.serve 127.0.0.1:443 -folder 0 -dc 1 -cluster 1
    service_instance = connect.SmartConnect(host='127.0.0.1', port=443, user='user', pwd='pass')
    content = service_instance.RetrieveContent()
    host_system =  get_obj(content, [vim.HostSystem], 'DC0_H0')
    print(host_system.configManager.firmwareSystem.QueryFirmwareConfigUploadURL())

if __name__ == "__main__":
    main()

vcsim prints following error:

2017/10/08 21:26:06 managed object not found: HostFirmwareSystem:ha-firmwareSystem
@anfernee
Copy link
Contributor

anfernee commented Oct 9, 2017

@Akasurde I can help on this issue. can you explain what do you expect from this. a random URL, or a URL that you can actually upload files to? The real ESX server, this group of API is used to backup/restore a bunch of config file on the remote host. This is not much to be configured for vcsim, so those files don't a lot of make sense. A little more details will help a lot. Thanks.

@Akasurde
Copy link
Contributor Author

@anfernee Ansible has a module vmware_cfg_backup which internally uses this API. In integration test, we use vcsim so this is needed.

Let me know if you need anything else.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 2, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

@Akasurde
Copy link
Contributor Author

Akasurde commented Jun 2, 2021

/remove-lifecycle stale.

@github-actions
Copy link
Contributor

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

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

No branches or pull requests

3 participants