def check_updates(*appliance_names): """ Run update check on appliances by names Args: appliance_names: Names of appliances to check; will check all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.check_updates) flash.assert_message_match("Check for updates has been initiated for the selected Servers") flash.dismiss()
def register_appliances(*appliance_names): """ Register appliances by names Args: appliance_names: Names of appliances to register; will register all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.register) flash.assert_message_match("Registration has been initiated for the selected Servers") flash.dismiss()
def update_appliances(*appliance_names): """ Update appliances by names Args: appliance_names: Names of appliances to update; will update all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.apply_updates) flash.assert_message_match("Update has been initiated for the selected Servers") flash.dismiss()
def update_appliances(*appliance_names): """ Update appliances by names Args: appliance_names: Names of appliances to update; will update all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.apply_updates) flash.assert_message_match("Update has been initiated for the selected Servers") flash.dismiss()
def check_updates(*appliance_names): """ Run update check on appliances by names Args: appliance_names: Names of appliances to check; will check all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.check_updates) flash.assert_message_match("Check for updates has been initiated for the selected Servers") flash.dismiss()
def register_appliances(*appliance_names): """ Register appliances by names Args: appliance_names: Names of appliances to register; will register all if empty """ select_appliances(*appliance_names) sel.click(update_buttons.register) flash.assert_message_match("Registration has been initiated for the selected Servers") flash.dismiss()
def update_registration(service, url, username, password, password_verify=None, repo_name=None, organization=None, use_proxy=False, proxy_url=None, proxy_username=None, proxy_password=None, proxy_password_verify=None, validate=True, cancel=False, set_default_rhsm_address=False, set_default_repository=False): """ Fill in the registration form, validate and save/cancel Args: service: Service type (registration method). url: Service server URL address. username: Username to use for registration. password: Password to use for registration. password_verify: 2nd entry of password for verification. Same as 'password' if None. repo_or_channel: Repository/channel to enable. organization: Organization (sat5/sat6 only). use_proxy: `True` if proxy should be used, `False` otherwise (default `False`). proxy_url: Address of the proxy server. proxy_username: Username for the proxy server. proxy_password: Password for the proxy server. proxy_password_verify: 2nd entry of proxy server password for verification. Same as 'proxy_password' if None. validate: Click the Validate button and check the flash message for errors if `True` (default `True`) cancel: Click the Cancel button if `True` or the Save button if `False` (default `False`) set_default_rhsm_address: Click the Default button connected to the RHSM (only) address if `True` set_default_repository: Click the Default button connected to the repo/channel if `True` Warning: 'password_verify' and 'proxy_password_verify' are available in 5.4+ only. Note: With satellite 6, it is necessary to validate credentials to obtain available organizations from the server. With satellite 5, 'validate' parameter is ignored because there is no validation button available. """ assert service in service_types, "Unknown service type '{}'".format(service) service_value = service_types[service] # In 5.4+, we have verification inputs as well if version.current_version() >= '5.4': password_verify = password_verify or password proxy_password_verify = proxy_password_verify or proxy_password # Otherwise, verification inputs are ignored df even if specified else: password_verify = None proxy_password_verify = None # Sat6 organization can be selected only after successful validation # while Sat5 organization is selected normally if service == 'sat6': organization_sat5 = None organization_sat6 = organization else: organization_sat5 = organization organization_sat6 = None sel.force_navigate("cfg_settings_region_red_hat_updates") sel.click(update_buttons.edit_registration) details = dict( service=sel.ByValue(service_value), url=url, username=username, password=password, password_verify=password_verify, repo_name=repo_name, organization_sat5=organization_sat5, use_proxy=use_proxy, proxy_url=proxy_url, proxy_username=proxy_username, proxy_password=proxy_password, proxy_password_verify=proxy_password_verify ) fill(registration_form, details) if set_default_rhsm_address: sel.click(registration_buttons.url_default) if set_default_repository: sel.click(registration_buttons.repo_default) if validate and service != 'sat5': sel.click(form_buttons.validate_short) flash.assert_no_errors() flash.dismiss() if organization_sat6: sel.select(registration_form.locators['organization_sat6'], organization_sat6) if cancel: form_buttons.cancel() else: form_buttons.save() flash.assert_message_match("Customer Information successfully saved") flash.dismiss()
def update_registration(service, url, username, password, password_verify=None, repo_name=None, organization=None, use_proxy=False, proxy_url=None, proxy_username=None, proxy_password=None, proxy_password_verify=None, validate=True, cancel=False, set_default_rhsm_address=False, set_default_repository=False): """ Fill in the registration form, validate and save/cancel Args: service: Service type (registration method). url: Service server URL address. username: Username to use for registration. password: Password to use for registration. password_verify: 2nd entry of password for verification. Same as 'password' if None. repo_or_channel: Repository/channel to enable. organization: Organization (sat5/sat6 only). use_proxy: `True` if proxy should be used, `False` otherwise (default `False`). proxy_url: Address of the proxy server. proxy_username: Username for the proxy server. proxy_password: Password for the proxy server. proxy_password_verify: 2nd entry of proxy server password for verification. Same as 'proxy_password' if None. validate: Click the Validate button and check the flash message for errors if `True` (default `True`) cancel: Click the Cancel button if `True` or the Save button if `False` (default `False`) set_default_rhsm_address: Click the Default button connected to the RHSM (only) address if `True` set_default_repository: Click the Default button connected to the repo/channel if `True` Warning: 'password_verify' and 'proxy_password_verify' are available in 5.4+ only. Note: With satellite 6, it is necessary to validate credentials to obtain available organizations from the server. With satellite 5, 'validate' parameter is ignored because there is no validation button available. """ assert service in service_types, "Unknown service type '{}'".format( service) service_value = service_types[service] # In 5.4+, we have verification inputs as well if version.current_version() >= '5.4': password_verify = password_verify or password proxy_password_verify = proxy_password_verify or proxy_password # Otherwise, verification inputs are ignored df even if specified else: password_verify = None proxy_password_verify = None # Sat6 organization can be selected only after successful validation # while Sat5 organization is selected normally if service == 'sat6': organization_sat5 = None organization_sat6 = organization else: organization_sat5 = organization organization_sat6 = None sel.force_navigate("cfg_settings_region_red_hat_updates") sel.click(update_buttons.edit_registration) details = dict(service=sel.ByValue(service_value), url=url, username=username, password=password, password_verify=password_verify, repo_name=repo_name, organization_sat5=organization_sat5, use_proxy=use_proxy, proxy_url=proxy_url, proxy_username=proxy_username, proxy_password=proxy_password, proxy_password_verify=proxy_password_verify) fill(registration_form, details) if set_default_rhsm_address: sel.click(registration_buttons.url_default) if set_default_repository: sel.click(registration_buttons.repo_default) if validate and service != 'sat5': sel.click(form_buttons.validate_short) flash.assert_no_errors() flash.dismiss() if organization_sat6: sel.select(registration_form.locators['organization_sat6'], organization_sat6) if cancel: form_buttons.cancel() else: form_buttons.save() flash.assert_message_match("Customer Information successfully saved") flash.dismiss()
def update_registration(service, url, username, password, repo_name=None, organization=None, use_proxy=False, proxy_url=None, proxy_username=None, proxy_password=None, validate=False, cancel=False, set_default_rhsm_address=False, set_default_repository=False): """ Fill in the registration form, validate and save/cancel Args: service: Service type (registration method). url: Service server URL address. username: Username to use for registration. password: Password to use for registration. repo_or_channel: Repository/channel to enable. organization: Organization (sat5/sat6 only). use_proxy: `True` if proxy should be used, `False` otherwise (default `False`). proxy_url: Address of the proxy server. proxy_username: Username for the proxy server. proxy_password: Password for the proxy server. validate: Click the Validate button and check the flash message for errors if `True` (default `False`) cancel: Click the Cancel button if `True` or the Save button if `False` (default `False`) set_default_rhsm_address: Click the Default button connected to the RHSM (only) address if `True` set_default_repository: Click the Default button connected to the repo/channel if `True` """ assert service in service_types, "Unknown service type '{}'".format( service) service_value = service_types[service] sel.force_navigate("cfg_settings_region_red_hat_updates") sel.click(update_buttons.edit_registration) details = dict(service=sel.ByValue(service_value), url=url, username=username, password=password, repo_name=repo_name, organization=organization, use_proxy=use_proxy, proxy_url=proxy_url, proxy_username=proxy_username, proxy_password=proxy_password) fill(registration_form, details) if set_default_rhsm_address: sel.click(registration_buttons.url_default) if set_default_repository: sel.click(registration_buttons.repo_default) if validate: sel.click(registration_buttons.validate) flash.assert_no_errors() flash.dismiss() if cancel: form_buttons.cancel() else: form_buttons.save() flash.assert_message_match("Customer Information successfully saved") flash.dismiss()
def test_description_required_error_validation(): error_text = "Description can't be blank" group = Group(description=None, role='EvmRole-approver') with error.expected(error_text): group.create() flash.dismiss()
def test_group_description_required_error_validation(): error_text = "Description can't be blank" group = Group(description=None, role='EvmRole-approver') with error.expected(error_text): group.create() flash.dismiss()
def update_registration(service, url, username, password, repo_name=None, organization=None, use_proxy=False, proxy_url=None, proxy_username=None, proxy_password=None, validate=False, cancel=False, set_default_rhsm_address=False, set_default_repository=False): """ Fill in the registration form, validate and save/cancel Args: service: Service type (registration method). url: Service server URL address. username: Username to use for registration. password: Password to use for registration. repo_or_channel: Repository/channel to enable. organization: Organization (sat5/sat6 only). use_proxy: `True` if proxy should be used, `False` otherwise (default `False`). proxy_url: Address of the proxy server. proxy_username: Username for the proxy server. proxy_password: Password for the proxy server. validate: Click the Validate button and check the flash message for errors if `True` (default `False`) cancel: Click the Cancel button if `True` or the Save button if `False` (default `False`) set_default_rhsm_address: Click the Default button connected to the RHSM (only) address if `True` set_default_repository: Click the Default button connected to the repo/channel if `True` """ assert service in service_types, "Unknown service type '{}'".format(service) service_value = service_types[service] sel.force_navigate("cfg_settings_region_red_hat_updates") sel.click(update_buttons.edit_registration) details = dict( service=sel.ByValue(service_value), url=url, username=username, password=password, repo_name=repo_name, organization=organization, use_proxy=use_proxy, proxy_url=proxy_url, proxy_username=proxy_username, proxy_password=proxy_password ) fill(registration_form, details) if set_default_rhsm_address: sel.click(registration_buttons.url_default) if set_default_repository: sel.click(registration_buttons.repo_default) if validate: sel.click(registration_buttons.validate) flash.assert_no_errors() flash.dismiss() if cancel: form_buttons.cancel() else: form_buttons.save() flash.assert_message_match("Customer Information successfully saved") flash.dismiss()
def update_registration(service, url, username, password, repo_name=None, organization=None, use_proxy=False, proxy_url=None, proxy_username=None, proxy_password=None, validate=False, cancel=False): """ Fill in the registration form, validate and save/cancel Args: service: Service type (registration method). url: Service server URL address. username: Username to use for registration. password: Password to use for registration. repo_or_channel: Repository/channel to enable. organization: Organization (sat5/sat6 only). use_proxy: `True` if proxy should be used, `False` otherwise (default `False`). proxy_url: Address of the proxy server. proxy_username: Username for the proxy server. proxy_password: Password for the proxy server. url_default: Click the 'Default' button to reset url (default `False`). repo_or_channel_default: Click the 'Default' button to reset repo (default `False`). validate: Click the Validate button and check the flash message for errors if `True` (default `False`) cancel: Click the Cancel button if `True` or the Save button if `False` (default `False`) """ assert service in service_types, "Unknown service type '{}'".format(service) service_value = service_types[service] sel.force_navigate("cfg_settings_region_red_hat_updates") sel.click(update_buttons.edit_registration) details = dict( service=(sel.VALUE, service_value), url=url, username=username, password=password, repo_name=repo_name, organization=organization, use_proxy=use_proxy, proxy_url=proxy_url, proxy_username=proxy_username, proxy_password=proxy_password ) fill(registration_form, details) if validate: sel.click(registration_buttons.validate) flash.assert_no_errors() flash.dismiss() if cancel: action = crud_buttons.cancel_button else: action = crud_buttons.save_button sel.click(action)