本文整理汇总了TypeScript中core/cloudProvider.CloudProviderRegistry类的典型用法代码示例。如果您正苦于以下问题:TypeScript CloudProviderRegistry类的具体用法?TypeScript CloudProviderRegistry怎么用?TypeScript CloudProviderRegistry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CloudProviderRegistry类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should use the specified provider from the configuration', () => {
let provider = '';
hasValue = true;
accounts = [fakeAccount('aws'), fakeAccount('titus')];
CloudProviderRegistry.registerProvider('aws', { securityGroup: {} } as any);
CloudProviderRegistry.registerProvider('titus', { securityGroup: { useProvider: 'aws' } } as any);
providerService.selectProvider(application, 'securityGroup').then(_provider => {
provider = _provider;
});
$scope.$digest();
expect(provider).toBe('aws');
});
开发者ID:mizzy,项目名称:deck,代码行数:13,代码来源:providerSelection.service.spec.ts
示例2: it
it('should use the provider "selected" from the "modal"', () => {
let provider = '';
hasValue = true;
accounts = [fakeAccount('aws'), fakeAccount('titus'), fakeAccount('testProvider')];
CloudProviderRegistry.registerProvider('aws', { securityGroup: {} } as any);
CloudProviderRegistry.registerProvider('titus', { securityGroup: { useProvider: 'aws' } } as any);
CloudProviderRegistry.registerProvider('testProvider', config);
ProviderSelectionService.selectProvider(application, 'securityGroup').then(_provider => {
provider = _provider;
});
$scope.$digest();
expect(provider).toBe('modalProvider');
});
开发者ID:spinnaker,项目名称:deck,代码行数:14,代码来源:ProviderSelectionService.spec.ts
示例3:
accountDetails.forEach(accountDetail => {
if (CloudProviderRegistry.getValue(accountDetail.cloudProvider, 'snapshotsEnabled')) {
jobs.push({
type: 'saveSnapshot',
credentials: accountDetail.name,
applicationName: app.name,
cloudProvider: accountDetail.cloudProvider,
});
}
});
开发者ID:emjburns,项目名称:deck,代码行数:10,代码来源:SnapshotWriter.ts
示例4: buildRestoreSnapshotJob
private static buildRestoreSnapshotJob(app: Application, accountDetail: IAccountDetails, timestamp: number) {
const jobs: IJob[] = [];
if (CloudProviderRegistry.getValue(accountDetail.cloudProvider, 'snapshotsEnabled')) {
jobs.push({
type: 'restoreSnapshot',
credentials: accountDetail.name,
applicationName: app.name,
snapshotTimestamp: timestamp,
cloudProvider: accountDetail.cloudProvider,
});
}
return jobs;
}
开发者ID:emjburns,项目名称:deck,代码行数:13,代码来源:SnapshotWriter.ts
注:本文中的core/cloudProvider.CloudProviderRegistry类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论