vicinityManager/server/services/items/registration.js
/*
Totally new TD --> Expects new instance to be created
*/
Totally new TD --> Expects new instance to be created
Totally new TD -- > Expects new instance to be created
function createInstance(obj, pwd, infra_id, callback){
  obj.save()
  .then(function(response){
    return commServerProcess(obj.oid, obj.name, pwd);
  })
  .then(function(response){
    callback({oid: obj.oid, password: pwd, "infrastructure-id": infra_id, id: obj._id}, "Success");
  })
  .catch(function(err){
    callback({oid: obj.oid, password: "NONE", infra_id: "NONE"}, err);
  });
}
function createInstance ( obj , pwd , infra_id , callback ) { obj . save ( ) . then ( function ( response ) { return commServerProcess ( obj . oid , obj . name , pwd ) ; } ) . then ( function ( response ) { callback ( { oid : obj . oid , password : pwd , "infrastructure-id" : infra_id , id : obj . _id } , "Success" ) ; } ) . catch ( function ( err ) { callback ( { oid : obj . oid , password : "NONE" , infra_id : "NONE" } , err ) ; } ) ; }
Totally new TD --> Expects new instance to be created
Totally new TD -- > Expects new instance to be created