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

vsphere: Enable using datastores in folders #11528

Merged
merged 1 commit into from
May 5, 2020

Conversation

babbageclunk
Copy link
Contributor

@babbageclunk babbageclunk commented May 4, 2020

Checklist

  • Checked if it requires a pylibjuju change?
  • Added integration tests for the PR?
  • Added or updated doc.go related to packages changed?
  • Do comments answer the question of why design decisions were made?

Description of change

Update the vsphereclient Datastores method to return datastores in folders under the root folder. Without this we will reject the creation saying there's no such datastore. We don't keep track of the inventory path of the datastore - when the name of the datastore is used for creating a new vm it's looked up on the compute resource, so the fully-qualified inventory path isn't needed.

QA steps

  • Bootstrap a vsphere controller.
  • Deploy an application using the name of a datastore that's nested under a folder.
juju deploy ~jameinel/ubuntu-lite --constraints "root-disk-source=datastore-name"

The deployment succeeds and the machine is created on the specified datastore.

Documentation changes

None

Bug reference

https://bugs.launchpad.net/juju/+bug/1874031

Update the vsphereclient Datastores method to return datastores under
foldes under the Datastores root folder. We don't keep track of the
inventory path of the datastore - when the name of the datastore is used
for creating a new vm it's looked up on the compute resource, so the
inventory path isn't needed.
@babbageclunk babbageclunk requested a review from ycliuhw May 4, 2020 22:44
Copy link
Member

@ycliuhw ycliuhw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@wallyworld
Copy link
Member

$$merge$$

@jujubot jujubot merged commit c32254e into juju:develop May 5, 2020
@babbageclunk babbageclunk deleted the 2.7-vsphere-datastore-folders branch May 5, 2020 01:17
@babbageclunk babbageclunk restored the 2.7-vsphere-datastore-folders branch May 5, 2020 04:43
jujubot added a commit that referenced this pull request May 5, 2020
…ders

#11532

### Checklist

 - [ ] Checked if it requires a [pylibjuju](https://github.com/juju/python-libjuju) change?
 - [ ] Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR?
 - [ ] Added or updated [doc.go](https://discourse.jujucharms.com/t/readme-in-packages/451) related to packages changed?
 - [ ] Do comments answer the question of why design decisions were made?

----

## Description of change
Update the vsphereclient Datastores method to return datastores in folders under the root folder. Without this we will reject the creation saying there's no such datastore. We don't keep track of the inventory path of the datastore - when the name of the datastore is used for creating a new vm it's looked up on the compute resource, so the fully-qualified inventory path isn't needed.

This is a backport of #11528 to the 2.7 branch - I'd intended to land it here first and then merge it forward but forgot to update the target branch.

## QA steps

* Bootstrap a vsphere controller.
* Deploy an application using the name of a datastore that's nested under a folder.
```sh
juju deploy ~jameinel/ubuntu-lite --constraints "root-disk-source=datastore-name"
``` 
The deployment succeeds and the machine is created on the specified datastore.

## Documentation changes

None

## Bug reference

https://bugs.launchpad.net/juju/+bug/1874031
@babbageclunk babbageclunk deleted the 2.7-vsphere-datastore-folders branch May 5, 2020 22:42
jujubot added a commit that referenced this pull request May 6, 2020
#11536

## Description of change

Merging recent changes in 2.7 into the develop branch:
* #11532 - this was accidentally landed against develop in #11528, this is merging the 2.7 change into develop after fixing it so that it doesn't muddy the waters for people doing subsequent merges.

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

Successfully merging this pull request may close these issues.

4 participants