Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #8823 from jawatts/fix_TypeError_rc
Browse files Browse the repository at this point in the history
[1LP][RFR] Fix TypeError in Latest RC Run
  • Loading branch information
mshriver authored May 14, 2019
2 parents fb2a752 + 57335f6 commit 0698c27
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cfme/automate/buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ def instantiate(
args = [group, text, hover, image, dialog]
elif type == "Ansible Playbook":
button_class = AnsiblePlaybookButton
args = [group, text, hover, image, playbook_cat_item, inventory, hosts]
args = [group, text, hover, image, playbook_cat_item, inventory]
kwargs['hosts'] = hosts
return button_class.from_collection(self, *args, **kwargs)

def create(
Expand Down
2 changes: 1 addition & 1 deletion cfme/rest/gen_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def automation_requests_data(vm, requests_collection=False, approve=True, num=4)
return [data for _ in range(num)]


def groups(request, appliance, role, tenant, num=1, **kwargs):
def groups(request, appliance, role, num=1, **kwargs):
tenant = kwargs.pop("tenant", appliance.rest_api.collections.tenants.get(name="My Company"))
if num > 1 and kwargs:
raise Exception("kwargs cannot be used when num is more than 1")
Expand Down
2 changes: 1 addition & 1 deletion cfme/storage/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def create(self, name, provider, tenant=None, volume_type=None, volume_size=1,
Args:
name: volume name
storage_manager: storage manager name
from_manager: create on the storage manager
tenant: tenant name
volume_size: volume size in GB
provider: provider
Expand Down
8 changes: 6 additions & 2 deletions cfme/tests/ansible/test_embedded_ansible_automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from cfme import test_requirements
from cfme.automate.simulation import simulate
from cfme.control.explorer import alert_profiles
from cfme.exceptions import ItemNotFound
from cfme.infrastructure.provider.virtualcenter import VMwareProvider
from cfme.markers.env_markers.provider import ONE_PER_TYPE
from cfme.services.myservice import MyService
Expand Down Expand Up @@ -200,8 +201,11 @@ def service_request(appliance, ansible_catalog_item):
def service(appliance, ansible_catalog_item):
_service = MyService(appliance, ansible_catalog_item.name)
yield _service

_service.delete_if_exists()
try:
if _service.exists:
_service.delete()
except ItemNotFound:
pass


@pytest.fixture
Expand Down
5 changes: 1 addition & 4 deletions cfme/tests/storage/test_volume_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@
@pytest.fixture(scope='module')
def backup(appliance, provider):
volume_collection = appliance.collections.volumes
storage_manager = '{} Cinder Manager'.format(provider.name)
backup_collection = appliance.collections.volume_backups.filter({'provider': provider})

# create new volume
volume = volume_collection.create(name=fauxfactory.gen_alpha(),
storage_manager=storage_manager,
tenant=provider.data['provisioning']['cloud_tenant'],
size=STORAGE_SIZE,
volume_size=STORAGE_SIZE,
provider=provider)

# create new backup for crated volume
Expand Down

0 comments on commit 0698c27

Please sign in to comment.