• Home
  • Raw
  • Download

Lines Matching full:profile

39     @return a dict of profiles objects. Returns None if no profile is found
55 Install a profile on the euicc at euicc_path.
60 @return iccid: iccid of the installed profile or None
93 # also skips iccid 89010000001234567882 - R&S as its TESTING profile
94 for profile in installed_profiles.keys():
96 installed_profiles[profile].state) == 'INACTIVE') and
98 installed_profiles[profile].profileclass) !=
101 logging.info('Uninstalling profile - iccid:%s',
102 installed_profiles[profile].iccid)
103 euicc.uninstall_profile(profile)
106 logging.error('Failed to uninstall a profile error:%s', e)
107 raise error.TestFail('Failed to uninstall profile')
154 Validates given profile(iccid) state
156 Check state of changed profile
160 @param iccid: iccid of the profile enabled/disabled
161 @param is_enable: true to enable profile and false to disable
170 # check profile with given iccid has target_state and rest are opposite
171 for profile in installed_profiles.values():
173 if iccid == profile.iccid:
174 if not (hermes_constants.ProfileStateToString(profile.state) ==
176 logging.error('profile:%s not in %s state',
177 profile.iccid, target_state)
182 logging.error('Profile %s error:%s', target_state, e)
186 is_active, euicc_path=None, hermes_manager=None, iccid=None, profile=None):
188 Enable or Disable already enabled/disabled profile
190 @param is_active: True to enable, False to disable profile
193 @param iccid: profile iccid to enable
194 @param profile: profile object to enable/disable
201 profile = euicc.get_profile_from_iccid(iccid)
204 profile.enable()
206 profile.disable()
211 get profile state
215 @param iccid: profile iccid to find state
216 @return True if profile state is Active and False if state is Inactive
221 profile = euicc.get_profile_from_iccid(iccid)
223 return True if (hermes_constants.ProfileStateToString(profile.state) ==
228 Returns a active/inactive profile on given euicc
230 This is to get already enabled or disabled profile. if not found enabled
231 profile, enable an inactive profile and if not found disable profile
232 disable an active profile
236 @param is_active: True to get active profile, False to get inactive profile
237 @return iccid: iccid of the active/inactive profile as requested
248 # Find active/inactive profile
251 for profile in installed_profiles.values():
254 profile.profileclass) == 'TESTING'):
257 if not (hermes_constants.ProfileStateToString(profile.state) ==
259 set_profile_state(is_active, profile=profile)
262 return profile.iccid
265 logging.error('No installed profile which is %s', profile_needed)
272 Get profile with disabled status and return its iccid
274 For test esim install new profile and return iccid of that profile
275 For prod esim having two profiles is prerequisite, return disabled profile
280 @return iccid: iccid of the installed profile or None
286 # get disabled profile on a prod esim, if not exist then do disable one
289 for profile in installed_profiles.values():
290 if (hermes_constants.ProfileClassToString(profile.profileclass) ==
294 if (hermes_constants.ProfileStateToString(profile.state) ==
296 return profile.iccid
306 Validates enable/disable profile api DBus call
310 @param iccid: iccid of the profile to be enabled/disabled
311 @param is_enable: true to enable profile and false to disable
321 # Profile objects maybe stale if IsActive is false
327 # Find active or inactive profile to enable/disable
328 for profile in installed_profiles.values():
329 if not (hermes_constants.ProfileStateToString(profile.state) ==
331 if iccid is None or iccid == profile.iccid:
332 logging.info('Profile to %s:%s', profile_action,
333 profile.iccid)
335 set_profile_state(is_enable, profile=profile)
341 'No profile to ' + profile_action)
342 # Check profile state
345 logging.error('Profile %s error:%s', profile_action, e)
358 @return iccid: iccid of the installed profile or None
364 # Read all profiles activation code from pending profile dict
365 # Install a profile from activation code, have iccid and
366 # Check the presence of this profile after installation
381 logging.error('install_profile_test: pending profile not found')
382 raise error.TestFail('No pending profile found on euicc:',
387 logging.debug('First pending profile:%s', profile_path_to_install)
405 raise error.TestFail('No installed profile found on euicc:',
411 logging.error('Failed to install a pending profile')
418 Find a profile from list of esim pending profiles which is not
419 installed yet and install that profile
427 @return iccid: iccid of the installed profile or None
441 'install_pending_profile_test: pending profile not found')
442 raise error.TestFail('No pending profile found on euicc:',
449 logging.info('Installing profile:%s iccid:%s act_code:%s',
454 profile = euicc.install_pending_profile(
456 logging.info('Installed pending profile is %s', profile)
457 if not profile:
458 logging.error('No profile object returned after install')
461 logging.error('Failed to install pending profile:%s', e)
462 raise error.TestFail('Failed to install pending profile',
465 # Find above installed profile, if not exists raise test failure
470 raise error.TestFail('Install pending profile failed :',
479 selected installed profile
483 @param iccid: iccid of the profile to be uninstalled
488 # Getinstalled profiles list and randomly uninstall a profile
495 raise error.TestFail('No valid profile found at:', euicc_path)
503 logging.info('profile to uninstall is:%s', profile_path)
510 'uninstall_profile_test failed - No uninstallable profile')
512 # Try to find the uninstalled profile, if exists raise test failure
514 for profile in profiles_installed.keys():
515 if uninstalled_profile in profile:
516 raise error.TestFail('uninstall_profile_test profile Failed')
519 raise error.TestFail('Failed to uninstall profile', e)