Пример #1
0
def eenter_ome_details(ome_ip, ome_username, ome_password):
    """
    This function is used for entering OME ip and credentials

    Function Owner : Abdul_G_Shaik

    Date created : 06/09/2016

    @@param ome_ip : (string) OME ip of system
    @param ome_userName : (string) OME user name
    @param ome_password : (string) OME password

    @return status : (bool) status of execution.if successful True else False
    @return msg : (string) step message in case of exception
    """
    msg, status = "", True

    try:
        'Click on + button'
        time.sleep(5)
        flag0 = ui_controls.button(get_obj_identifier('ome_add_btn'))
        print 'plus button clicked'

        'Enter OME application ip and credentials'
        flag1 = ui_controls.text_box(
            get_obj_identifier('addOme_ipHostname_txt'), ome_ip)
        flag2 = ui_controls.text_box(get_obj_identifier('addOme_username_txt'),
                                     ome_username)
        flag3 = ui_controls.text_box(get_obj_identifier('addOme_password_txt'),
                                     ome_password)
        ui_controls.hide_keyboard()
        time.sleep(5)
        'Click on + button'

        time.sleep(5)
        flag4 = ui_controls.Click(get_obj_identifier('addOme_add_btn'))
        print 'add ome button clicked'
        time.sleep(5)
        flag5 = ui_controls.Click(
            get_obj_identifier('addome_confirmation_yes_btn'))
        time.sleep(20)
        #flag6=ui_controls.Click(get_obj_identifier('save_btn'))
        time.sleep(5)
        flag7 = ui_controls.Click(get_obj_identifier('alert_ok_btn'))
        time.sleep(10)
        status = False if not (flag0 and flag1 and flag2 and flag3 and flag4
                               and flag5 and flag7) else True
    except Exception as excp:
        traceback.print_exc()
        msg += str(excp)
        status = False
    return status, msg
Пример #2
0
def enter_ome_details(ome_ip, ome_username, ome_password):
    """
    This function is used for entering OME ip and credentials

    Function Owner : Abdul_G_Shaik

    Date created : 06/09/2016

    @@param ome_ip : (string) OME ip of system
    @param ome_userName : (string) OME user name
    @param ome_password : (string) OME password

    @return status : (bool) status of execution.if successful True else False
    @return msg : (string) step message in case of exception
    """
    msg, status = "", True

    try:
        #flag0 = ui_controls.Click(get_obj_identifier('open_manage_esntials_elmnt'))
        #print 'openManage Essentials selected successfully'

        'Enter OME application ip and credentials'
        flag1 = ui_controls.text_box(
            get_obj_identifier('addOme_ipHostname_txt'), ome_ip)
        flag2 = ui_controls.text_box(get_obj_identifier('addOme_username_txt'),
                                     ome_username)
        flag3 = ui_controls.text_box(get_obj_identifier('addOme_password_txt'),
                                     ome_password)
        ui_controls.hide_keyboard()
        time.sleep(5)
        'Click add button'
        #flag4 = ui_controls.button(get_obj_identifier('addOme_add_btn'))
        print 'OME details entered successfully'
        #flag5 = ui_controls.Click(get_obj_identifier('yes_pop_up_btn'))
        #time.sleep(7)
        #flag6 = ui_controls.Click(get_obj_identifier('save_btn'))
        #time.sleep(5)
        #flag7 = ui_controls.Click(get_obj_identifier('yes_pop_up_btn'))
        #flag7 = ui_controls.Click(get_obj_identifier('Ok_bttn'))
        #time.sleep(15)

        status = False if not (flag1 and flag2 and flag3) else True
    except Exception as excp:
        traceback.print_exc()
        msg += str(excp)
        status = False
    return status, msg
Пример #3
0
    def test_1200_1(self):
        """
        @testcase: Testcase_1200
        """
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '####################################################################################'
        '####################################################################################'
        '***************************Work Flow when VNC is enabled & bvnc is not installed'
        '####################################################################################'
        '####################################################################################'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        
        '#####################################################################################'
        'Add code below to Enable VNC & set password & set SSLEncryptionBitLength to Disabled '
        '#####################################################################################'
#         idrac_lib.apply_vnc_attributes('Enable', 1, idrac_ip, idrac_userName, idrac_password,
#                         windows_ip, windows_username, windows_password)
#          idrac_lib.apply_vnc_attributes('Password', 'calvin', idrac_ip, idrac_userName, idrac_password,
#                        windows_ip, windows_username, windows_password)
#         idrac_lib.apply_vnc_attributes('SSLEncryptionBitLength', 'Disabled', idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
        '#####################################################################################'
        'Verify license agreement screen and accept license'
        #step_1 = obj_omm.step_verify_license_agreement_screenname
        #step_15 = obj_omm.step_accept_license
        
        'Verify share app Data screen and do not share'
        #step_3 = obj_omm.step_verify_share_appData_screenname
        #step_16 = obj_omm.step_dont_share
        
        'Verify create password screen and create password'
        #step_5 = obj_omm.step_verify_createPassword_screen
        #step_17 = obj_omm.step_create_password
        
        'Verify demo mode screen and continue to OMM'
        #step_7 = obj_omm.step_verify_demomode_screenname
        #step_18 = obj_omm.step_trydemo_continue
       
        step_0 = obj_omm.step_add_idrac      
        'To launch Virtual Console from iDRAC home page'
        time.sleep(8)
        step_1 = obj_omm.step_launchVirtualConsole
        
        'To verify Virtual Console Alert message'
        step_2 = obj_omm.step_virtualConsoleAlertHandle
        
        'To install bvnc app'
        step_3 = obj_omm.step_install_bvnc_app
        
        'Stop the driver'
        step_4 = obj_common.step_stopDriver
        
        'Start driver to start app again'
        step_5 = obj_common.step_startDriver
    
           
        'Launch Virtual console after bvnc install'
        step_6 = obj_omm.step_launchVirtualConsole
        
        'Configure virtual console settings after bvnc install'
        step_7 = obj_omm.step_configureLaunchVirtualConsole
        
        'Verify the Alert on launching VNC'
        step_8 = obj_omm.step_verifylaunchVNCAlert
        
        'Verifying VNC Viewer'
        step_9 = obj_omm.step_verifyVNCViewer
        
        'Stop the driver'
        step_10 = obj_common.step_stopDriver
        
        'Start the driver again to launch bvnc for second time'
        step_11 = obj_common.step_startDriver

        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '####################################################################################'
        '####################################################################################'
        '***************************Work flow when vnc is already installed'
        '####################################################################################'
        '####################################################################################'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'
        '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'


        'Launch Virtual Console after bvnc install & after establishing handshake'
        step_12 = obj_omm.step_launchVirtualConsole
        
        'Configure vnc settings after establishing handshake'
        step_13 = obj_omm.step_configureLaunchVirtualConsole
        
        'View VNC Viewer after establishing hand shake'
        step_14 = obj_omm.step_verifyVNCViewer

         
#         'Flow when VNC is disabled'
#         '##### Code to disable VNC to be added ####'
#         idrac_lib.apply_vnc_attributes('Enable', 0, idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
#          
#         'Flow when encryption is set to 128-bit or higher '
#         idrac_lib.apply_vnc_attributes('SSLEncryptionBitLength', '128-bit or higher', idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
         
#         'Flow when encryption is set to 168-bit or higher'
#         idrac_lib.apply_vnc_attributes('SSLEncryptionBitLength', '168-bit or higher', idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
#         
#         'Flow when encryption is set to 256-bit or higher'
#         idrac_lib.apply_vnc_attributes('SSLEncryptionBitLength', '256-bit or higher', idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
#         
#         'Flow when encryption is set to AutoNegotiation'
#         idrac_lib.apply_vnc_attributes('SSLEncryptionBitLength', 'Auto Negotiate', idrac_ip, idrac_userName, idrac_password,
#                       windows_ip, windows_username, windows_password)
        
        if self.driver_start_status:
            
            testcase_parameters = {'startServer': False, 'stopServer': False}
            '#####################################################################################'
            'Add merged code to  login to OMM & navigate to the specific idrac page'
            '#####################################################################################'
            time.sleep(15)
            ui_controls.text_box('id=com.dell.omm:id/enter_password_enter_id', value='Dell')
            ui_controls.button('id=com.dell.omm:id/login_button_id')
            ui_controls.button('id=com.dell.omm:id/top_text')
            time.sleep(50)
            '#####################################################################################'
            
            'Execute steps to launch VNC & install bvnc'
            self.run_steps(step_0,step_1,step_2,step_3, step_4, step_5,
                           step_args=[self, testcase_parameters], continue_on_fail=True)

            '#####################################################################################'
            'Add merged code to  login to OMM & navigate to the specific idrac page'
            '#####################################################################################'        
            time.sleep(5)
            ui_controls.text_box('id=com.dell.omm:id/enter_password_enter_id', value='Dell')
            ui_controls.button('id=com.dell.omm:id/login_button_id')
            ui_controls.button('id=com.dell.omm:id/top_text')
            time.sleep(50)
            '#####################################################################################' 
            
            'Execute steps to launch VNC Viewer'
            self.run_steps(step_6, step_7, step_8, step_9, step_10, step_11,
                           step_args=[self, testcase_parameters], continue_on_fail=False)
 
 
            '#####################################################################################'
            'Add merged code to  login to OMM & navigate to the specific idrac page'
            '#####################################################################################'  
            ui_controls.text_box('id=com.dell.omm:id/enter_password_enter_id', value='Dell')
            ui_controls.button('id=com.dell.omm:id/login_button_id')
            ui_controls.button('id=com.dell.omm:id/top_text')
            time.sleep(45)
            '#####################################################################################'  
 
             
            'Execute steps to launch VNC Viewer when bvnc is already installed'
            self.run_steps(step_12, step_13, step_14,
                           step_args=[self, testcase_parameters], continue_on_fail=False)
            
        else:
            self.fail("Failed to start driver")       
Пример #4
0
def select_device_and_create_powertask():
    """
    This function is used to select a target MN to create the power task under OME from OMM.

    Function Owner : Sudhish_Singh

    Date created : 

    @return status : (bool)status of execution.if successful True else False
    @return msg : (string) step message in case of exception
    """
    msg, status = "", True

    try:
        time.sleep(10)
        'Click on Devices pie chart to navigate under ALl Devices'
        flag1 = ui_controls.button(get_obj_identifier('devices_health_piechart'))
        time.sleep(40)

        'Select RAC group and click on it during power task creation'

        flag2 = ui_controls.Click_MultipleUIElements_Selectpassedelement(get_obj_identifier('device_type_rac_powertask'),Elementnameforselection='RAC',elementidentifier='device_type_rac_powertask',elementname='RAC')
        time.sleep(40)

        'select the passed target device for power task creation'
        flag3 = ui_controls.Click_MultipleUIElements_Selectpassedelement(get_obj_identifier('powertask_target_mn'),Elementnameforselection='idrac',elementidentifier='powertask_target_mn',elementname='idrac8')
        time.sleep(5)
        'click on power option menu'
     
        flag4 = ui_controls.Click(get_obj_identifier('more_options_btn'))
        'Click on power button for navigating to power options page(reboot page)'
        flag5 = ui_controls.Click(get_obj_identifier('powertask_power_btn'))
        time.sleep(5)

        'First enter the task credentials here'
        #flag6 = ui_controls.text_box(get_obj_identifier('powertask_username_txt'),'Lexington123')
        #flag7 = ui_controls.text_box(get_obj_identifier('powertask_password_txt'),'administrator')
        flag6 = ui_controls.text_box(get_obj_identifier('powertask_username_txt'),'administrator')
        flag7 = ui_controls.text_box(get_obj_identifier('powertask_password_txt'),'Lexington123')
        ui_controls.hide_keyboard()
        time.sleep(5)

        'click on Enable All check box'
        flag8 = ui_controls.check_box(get_obj_identifier('powertask_enableall_checkbox'))
        time.sleep(5)

        'select appropriate power task for creation as per test case requirement'
        flag9 = ui_controls.check_box(get_obj_identifier('powertask_radio_poweron'))
        time.sleep(5)

        'Click on submit for creating the task under OME for same device'
        flag10 = ui_controls.Click(get_obj_identifier('powertask_submit_btn'))
        time.sleep(5)

        'Click on Yes button from confirm operation window'
        flag11 = ui_controls.Click(get_obj_identifier('powertask_confirmoperation_yes_btn'))
        time.sleep(5)

        #'Click on Task manager button to monitor task status under Task manager window'
        #flag11 = ui_controls.Click(get_obj_identifier('powertask_taskmgr_taskmanager_btn'))
        #time.sleep(5)
        'click on task manager on power task pop up'
        flag12 = ui_controls.Click(get_obj_identifier('taskmngr_btn'))

        'Here we will verify if Task Manager window has been launched successfully or not'
        flag13,msg = element_textvalidation('taskmanager_window','Task Manager')
        time.sleep(4)

        'Check for task name under Task Manager window'
        flag14,msg = element_textvalidation('powertask_name_taskmanager','Power On of idrac')


        status = False if not (flag1 and flag2 and flag3 and flag4 and flag5 and flag6 and flag7 and flag8 and flag9 and flag10 and flag11 and flag12 and flag13 and flag14) else True

        print status

    except Exception as excp:
        traceback.print_exc()
        msg += str(excp)
        status = False
    return status, msg