Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
executeBashCommandExec = doUtil.executeBashCommandExec;
getCurrentPlatform = doUtil.getCurrentPlatform;
bigIpMock = new BigIpMock();
bigIpMock.list = () => Promise.resolve({
value: 'none'
});
});
.then((data) => {
credentials = data;
masterBigIp = new BigIp({ loggerOptions: this.loggerOptions });
return masterBigIp.init(
mgmtIp,
credentials.username,
credentials.password,
{ port: mgmtPort || this.mgmtPort }
);
})
.then(() => {
GceCloudProvider.prototype.bigIpReady = function bigIpReady() {
if (this.clOptions.user && (this.clOptions.password || this.clOptions.passwordUrl)) {
bigIp = new BigIp({ loggerOptions: this.loggerOptions });
return bigIp.init(
'localhost',
this.clOptions.user,
this.clOptions.password || this.clOptions.passwordUrl,
{
port: parseInt(this.mgmtPort, 10),
passwordIsUrl: typeof this.clOptions.passwordUrl !== 'undefined',
passwordEncrypted: this.clOptions.passwordEncrypted
}
)
.then(() => {
if (this.instancesToRevoke.length > 0) {
logger.debug('Revoking licenses of non-masters that are not known to GCE');
return this.revokeLicenses(this.instancesToRevoke, { bigIp });
}
return q();
getBigIp(callingLogger, options) {
const optionalArgs = {};
Object.assign(optionalArgs, options);
const bigIp = new BigIp({ logger: callingLogger });
return this.initializeBigIp(
bigIp,
optionalArgs.host || 'localhost',
optionalArgs.port,
optionalArgs.user || 'admin',
optionalArgs.authToken || optionalArgs.password || 'admin',
{
passwordIsToken: !!optionalArgs.authToken
}
);
},