@Name : get_suitable_test_template @Desc : Retrieves the test template information based upon inputs provided For Xenserver, get_test_template is used for retrieving the template while get_template is used for other hypervisors or when get_test_template f
(apiclient, zoneid, ostypeid, hypervisor, deploy_as_is=False)
| 517 | return FAILED |
| 518 | |
| 519 | def get_suitable_test_template(apiclient, zoneid, ostypeid, hypervisor, deploy_as_is=False): |
| 520 | ''' |
| 521 | @Name : get_suitable_test_template |
| 522 | @Desc : Retrieves the test template information based upon inputs provided |
| 523 | For Xenserver, get_test_template is used for retrieving the template |
| 524 | while get_template is used for other hypervisors or when |
| 525 | get_test_template fails |
| 526 | @Input : returns a template" |
| 527 | @Output : FAILED in case of any failure |
| 528 | template Information matching the inputs |
| 529 | ''' |
| 530 | template = FAILED |
| 531 | if hypervisor.lower() in ["xenserver"] or (hypervisor.lower() in ["vmware"] and deploy_as_is): |
| 532 | template = get_test_template( |
| 533 | apiclient, |
| 534 | zoneid, |
| 535 | hypervisor, |
| 536 | deploy_as_is=deploy_as_is) |
| 537 | if template == FAILED: |
| 538 | template = get_template( |
| 539 | apiclient, |
| 540 | zoneid, |
| 541 | ostypeid) |
| 542 | return template |
| 543 | |
| 544 | def download_systemplates_sec_storage(server, services): |
| 545 | """Download System templates on sec storage""" |