Another type to rename

This commit is contained in:
Vincent Fiduccia 2021-05-28 17:09:43 -07:00
parent abfa67416f
commit 1df59ed177
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
2 changed files with 8 additions and 7 deletions

View File

@ -154,6 +154,7 @@ export const CAPI = {
MACHINE_SET: 'cluster.x-k8s.io.machineset',
MACHINE: 'cluster.x-k8s.io.machine',
RANCHER_CLUSTER: 'provisioning.cattle.io.cluster',
MACHINE_CONFIG_GROUP: 'rke-machine-config.cattle.io',
};
// --------------------------------------

View File

@ -311,7 +311,7 @@ export default {
return null;
}
const schema = this.$store.getters['management/schemaFor'](`rke-machine-config.cattle.io.${ this.provider }config`);
const schema = this.$store.getters['management/schemaFor'](`${ CAPI.MACHINE_CONFIG_GROUP }.${ this.provider }config`);
return schema;
},
@ -449,7 +449,7 @@ export default {
if ( existing?.length ) {
for ( const pool of existing ) {
const config = await this.$store.dispatch('management/find', {
type: `provisioning.cattle.io.${ pool.machineConfigRef.kind.toLowerCase() }`,
type: `${ CAPI.MACHINE_CONFIG_GROUP }.${ pool.machineConfigRef.kind.toLowerCase() }`,
id: `${ this.value.metadata.namespace }/${ pool.machineConfigRef.name }`,
});