@@ -618,16 +618,10 @@ export default {
618618 },
619619 fetchAffinityGroups () {
620620 this .affinityGroups = []
621- this .controlAffinityGroups = []
622- this .workerAffinityGroups = []
623- this .etcdAffinityGroups = []
624621 const params = {}
625622 if (! this .isObjectEmpty (this .selectedZone )) {
626623 params .zoneid = this .selectedZone .id
627624 }
628- if (this .isAdminOrDomainAdmin ()) {
629- params .listall = true
630- }
631625 this .affinityGroupLoading = true
632626 getAPI (' listAffinityGroups' , params).then (json => {
633627 const groups = json .listaffinitygroupsresponse .affinitygroup
@@ -919,22 +913,6 @@ export default {
919913 size: values .size ,
920914 clustertype: ' CloudManaged'
921915 }
922- if (this .isAdminOrDomainAdmin ()) {
923- const selectedGroupIds = [... this .controlAffinityGroups , ... this .workerAffinityGroups , ... this .etcdAffinityGroups ]
924- const selectedGroups = selectedGroupIds .map (id => this .affinityGroups .find (affinityGroup => affinityGroup .id === id)).filter (Boolean )
925- if (selectedGroups .length > 0 ) {
926- const hasMixedAccounts = selectedGroups .some (ag => ag .account !== selectedGroups[0 ].account )
927- if (hasMixedAccounts) {
928- this .$notification .error ({
929- message: this .$t (' message.error.affinity.groups.different.accounts' )
930- })
931- this .loading = false
932- return
933- }
934- params .domainid = selectedGroups[0 ].domainid
935- params .account = selectedGroups[0 ].account
936- }
937- }
938916 if (values .hypervisor !== null ) {
939917 params .hypervisor = this .selectedZoneHypervisors [values .hypervisor ].name .toLowerCase ()
940918 }
0 commit comments