webservice/src/services/ApiManager.js
/**
   * Private function called to retrieve all lab templates for a specific course (called by getCRDtemplates)
   *
   * @param course the specific course, the group the user belongs (cloud-computing, software-networking, ...)
   * @return the object {courseNamespace, List of lab templates} if available
   */
Private function called to retrieve all lab templates for a specific course (called by getCRDtemplates)
@param course the specific course, the group the user belongs (cloud-computing, software-networking, ...)
@return the object {courseNamespace, List of lab templates} if available
Private function called to retrieve all lab templates for a specific course ( called by getCRDtemplates ) @param course the specific course the group the user belongs ( cloud - computing software - networking ... ) @return the object { courseNamespace List of lab templates } if available
async retrieveSingleCRDtemplate(course) {
    let ret = await this.apiCRD
      .listNamespacedCustomObject(
        this.templateGroup,
        this.version,
        course,
        this.templatePlural
      )
      .then(nodesResponse =>
        nodesResponse.body.items.map(x => ({
          name: x.metadata.name,
          description: x.spec.description,
          type: x.spec.vmType,
          labNum: x.spec.labNum
        }))
      )
      .catch(error => {
        Promise.reject(error);
      });
    if (ret !== null) {
      ret = { course, labs: ret };
    }
    return ret;
  }
async retrieveSingleCRDtemplate ( course ) { let ret = await this . apiCRD . listNamespacedCustomObject ( this . templateGroup , this . version , course , this . templatePlural ) . then ( nodesResponse => nodesResponse . body . items . map ( x => ( { name : x . metadata . name , description : x . spec . description , type : x . spec . vmType , labNum : x . spec . labNum } ) ) ) . catch ( error => { Promise . reject ( error ) ; } ) ; if ( ret !== null ) { ret = { course , labs : ret } ; } return ret ; }
Private function called to retrieve all lab templates for a specific course (called by getCRDtemplates)
 @param course the specific course, the group the user belongs (cloud-computing, software-networking, ...)
 @return the object {courseNamespace, List of lab templates} if available
Private function called to retrieve all lab templates for a specific course ( called by getCRDtemplates ) @param course the specific course the group the user belongs ( cloud - computing software - networking ... ) @return the object { courseNamespace List of lab templates } if available