webservice/src/services/ApiManager.js
/**
   * Function to create a lab instance
   *
   * @param labTemplateName the name of the lab template
   * @param labTemplateNamespace the namespace which the lab template belongs
   * @returns the promise handling the request
   */
Function to create a lab instance
@param labTemplateName the name of the lab template
@param labTemplateNamespace the namespace which the lab template belongs
@returns the promise handling the request
Function to create a lab instance @param labTemplateName the name of the lab template @param labTemplateNamespace the namespace which the lab template belongs @returns the promise handling the request
createCRDinstance(labTemplateName, labTemplateNamespace) {
    return this.apiCRD.createNamespacedCustomObject(
      this.instanceGroup,
      this.version,
      this.instanceNamespace,
      this.instancePlural,
      {
        apiVersion: `${this.instanceGroup}/${this.version}`,
        kind: 'LabInstance',
        metadata: {
          name: `${labTemplateName}-${this.studentID}-${Math.floor(
            getRandomInt(1000, 10000)
          )}`,
          namespace: this.instanceNamespace
        },
        spec: {
          labTemplateName,
          labTemplateNamespace,
          studentId: this.studentID
        }
      }
    );
  }
createCRDinstance ( labTemplateName , labTemplateNamespace ) { return this . apiCRD . createNamespacedCustomObject ( this . instanceGroup , this . version , this . instanceNamespace , this . instancePlural , { apiVersion : ` ${ this . instanceGroup } ${ this . version } ` , kind : 'LabInstance' , metadata : { name : ` ${ labTemplateName } ${ this . studentID } ${ Math . floor ( getRandomInt ( 1000 , 10000 ) ) } ` , namespace : this . instanceNamespace } , spec : { labTemplateName , labTemplateNamespace , studentId : this . studentID } } ) ; }
Function to create a lab instance
 @param labTemplateName the name of the lab template
 @param labTemplateNamespace the namespace which the lab template belongs
 @returns the promise handling the request
Function to create a lab instance @param labTemplateName the name of the lab template @param labTemplateNamespace the namespace which the lab template belongs @returns the promise handling the request