mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Converting all SQL MIAA commands to use K8s API commands (#20203)
* refresh does not differentiate direct vs indirect * For direct mode MIAA commands, always use --use-k8s * Changed comment language to use ARM instead of direct and K8S API instead of indirect Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -15,7 +15,6 @@ import { ConnectToMiaaSqlDialog } from '../ui/dialogs/connectMiaaDialog';
|
||||
import { AzureArcTreeDataProvider } from '../ui/tree/azureArcTreeDataProvider';
|
||||
import { ControllerModel, Registration } from './controllerModel';
|
||||
import { ResourceModel } from './resourceModel';
|
||||
import { ConnectionMode } from '../constants';
|
||||
|
||||
export type DatabaseModel = { name: string, status: string, earliestBackup: string, lastBackup: string };
|
||||
export type RPModel = { recoveryPointObjective: string, retentionDays: string };
|
||||
@@ -100,25 +99,14 @@ export class MiaaModel extends ResourceModel {
|
||||
try {
|
||||
try {
|
||||
let result;
|
||||
if (this.controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
||||
result = await this._azApi.az.sql.miarc.show(
|
||||
this.info.name,
|
||||
{
|
||||
resourceGroup: this.controllerModel.info.resourceGroup,
|
||||
namespace: undefined
|
||||
},
|
||||
this.controllerModel.azAdditionalEnvVars
|
||||
);
|
||||
} else {
|
||||
result = await this._azApi.az.sql.miarc.show(
|
||||
this.info.name,
|
||||
{
|
||||
resourceGroup: undefined,
|
||||
namespace: this.controllerModel.info.namespace
|
||||
},
|
||||
this.controllerModel.azAdditionalEnvVars
|
||||
);
|
||||
}
|
||||
result = await this._azApi.az.sql.miarc.show(
|
||||
this.info.name,
|
||||
{
|
||||
resourceGroup: undefined,
|
||||
namespace: this.controllerModel.info.namespace
|
||||
},
|
||||
this.controllerModel.azAdditionalEnvVars
|
||||
);
|
||||
this._config = result.stdout;
|
||||
this.configLastUpdated = new Date();
|
||||
this.rpSettings.retentionDays = this._config?.spec?.backup?.retentionPeriodInDays?.toString() ?? '';
|
||||
|
||||
Reference in New Issue
Block a user