mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 19:48:37 -05:00
Feature/bdc create (#4012)
* initial checkin * rename * wizard pages * target cluster radio button group * resource strings * existing cluster picker * revert changes to unwanted file * revert unwanted changes-2 * update cluster icon * settings page * fix group container * hyperlink component * address review comments * comments part 2
This commit is contained in:
35
extensions/big-data-cluster/src/data/kubeConfigParser.ts
Normal file
35
extensions/big-data-cluster/src/data/kubeConfigParser.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { ClusterInfo } from '../interfaces';
|
||||
|
||||
export interface IKubeConfigParser {
|
||||
parse(configPath: string): ClusterInfo[];
|
||||
}
|
||||
|
||||
export class TestKubeConfigParser implements IKubeConfigParser {
|
||||
parse(configPath: string): ClusterInfo[] {
|
||||
let clusters = [];
|
||||
for (let i = 0; i < 18; i++) {
|
||||
let name;
|
||||
if (i % 2 === 0) {
|
||||
name = `kubernetes cluster ${i}`;
|
||||
}
|
||||
else {
|
||||
name = 'cluster dev ' + i;
|
||||
}
|
||||
clusters.push(
|
||||
{
|
||||
displayName: name,
|
||||
name: `kub-dev-xxxx-cluster-${i}`,
|
||||
user: 'root'
|
||||
}
|
||||
);
|
||||
}
|
||||
return clusters;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user