Skip to content

Commit

Permalink
Remove the virtualization code.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Sep 18, 2024
1 parent ec6b1aa commit 87408c9
Show file tree
Hide file tree
Showing 336 changed files with 123 additions and 31,692 deletions.
7 changes: 2 additions & 5 deletions java/code/src/com/redhat/rhn/GlobalInstanceHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import com.suse.manager.kubernetes.KubernetesManager;
import com.suse.manager.utils.SaltKeyUtils;
import com.suse.manager.utils.SaltUtils;
import com.suse.manager.virtualization.VirtManagerSalt;
import com.suse.manager.webui.controllers.bootstrap.RegularMinionBootstrapper;
import com.suse.manager.webui.controllers.bootstrap.SSHMinionBootstrapper;
import com.suse.manager.webui.menu.MenuTree;
Expand All @@ -42,7 +41,6 @@
import com.suse.manager.webui.services.iface.MonitoringManager;
import com.suse.manager.webui.services.iface.SaltApi;
import com.suse.manager.webui.services.iface.SystemQuery;
import com.suse.manager.webui.services.iface.VirtManager;
import com.suse.manager.webui.services.impl.SaltService;
import com.suse.manager.webui.utils.MinionActionUtils;
import com.suse.manager.webui.utils.UserPreferenceUtils;
Expand Down Expand Up @@ -79,15 +77,14 @@ private GlobalInstanceHolder() {
public static final RenderUtils RENDER_UTILS = new RenderUtils(ACL_FACTORY);
public static final MinionActionUtils MINION_ACTION_UTILS = new MinionActionUtils(SALT_API, SALT_UTILS);
public static final KubernetesManager KUBERNETES_MANAGER = new KubernetesManager(SALT_API);
public static final VirtManager VIRT_MANAGER = new VirtManagerSalt(SALT_API);
public static final RegularMinionBootstrapper REGULAR_MINION_BOOTSTRAPPER =
new RegularMinionBootstrapper(SYSTEM_QUERY, SALT_API, PAYG_MANAGER, ATTESTATION_MANAGER);
public static final SSHMinionBootstrapper SSH_MINION_BOOTSTRAPPER =
new SSHMinionBootstrapper(SYSTEM_QUERY, SALT_API, PAYG_MANAGER, ATTESTATION_MANAGER);
public static final MonitoringManager MONITORING_MANAGER = new FormulaMonitoringManager(SALT_API);
public static final SystemEntitlementManager SYSTEM_ENTITLEMENT_MANAGER = new SystemEntitlementManager(
new SystemUnentitler(VIRT_MANAGER, MONITORING_MANAGER, SERVER_GROUP_MANAGER),
new SystemEntitler(SALT_API, VIRT_MANAGER, MONITORING_MANAGER,
new SystemUnentitler(MONITORING_MANAGER, SERVER_GROUP_MANAGER),
new SystemEntitler(SALT_API, MONITORING_MANAGER,
SERVER_GROUP_MANAGER)
);
public static final SystemManager SYSTEM_MANAGER = new SystemManager(ServerFactory.SINGLETON,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@
import com.redhat.rhn.testing.TestUtils;
import com.redhat.rhn.testing.UserTestUtils;

import com.suse.manager.virtualization.VirtManagerSalt;
import com.suse.manager.webui.services.iface.MonitoringManager;
import com.suse.manager.webui.services.iface.SaltApi;
import com.suse.manager.webui.services.iface.VirtManager;
import com.suse.manager.webui.services.test.TestSaltApi;

import org.junit.jupiter.api.BeforeEach;
Expand All @@ -69,11 +67,10 @@ public class AccessTest extends BaseTestCaseWithUser {
private Acl acl;
private final SaltApi saltApi = new TestSaltApi();
private final ServerGroupManager serverGroupManager = new ServerGroupManager(saltApi);
private final VirtManager virtManager = new VirtManagerSalt(saltApi);
private final MonitoringManager monitoringManager = new FormulaMonitoringManager(saltApi);
private final SystemEntitlementManager systemEntitlementManager = new SystemEntitlementManager(
new SystemUnentitler(virtManager, monitoringManager, serverGroupManager),
new SystemEntitler(saltApi, virtManager, monitoringManager, serverGroupManager)
new SystemUnentitler(monitoringManager, serverGroupManager),
new SystemEntitler(saltApi, monitoringManager, serverGroupManager)
);

@Override
Expand Down
80 changes: 0 additions & 80 deletions java/code/src/com/redhat/rhn/domain/action/ActionFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,6 @@
import com.redhat.rhn.domain.action.script.ScriptActionDetails;
import com.redhat.rhn.domain.action.script.ScriptRunAction;
import com.redhat.rhn.domain.action.server.ServerAction;
import com.redhat.rhn.domain.action.virtualization.BaseVirtualizationVolumeAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationCreateGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationDeleteGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationDestroyGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationMigrateGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationNetworkCreateAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationNetworkStateChangeAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationPoolCreateAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationPoolDeleteAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationPoolRefreshAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationPoolStartAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationPoolStopAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationRebootGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationResumeGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationSchedulePollerAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationSetMemoryGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationSetVcpusGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationShutdownGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationStartGuestAction;
import com.redhat.rhn.domain.action.virtualization.VirtualizationSuspendGuestAction;
import com.redhat.rhn.domain.config.ConfigRevision;
import com.redhat.rhn.domain.rhnpackage.PackageEvr;
import com.redhat.rhn.domain.rhnpackage.PackageEvrFactory;
Expand Down Expand Up @@ -419,72 +399,12 @@ else if (typeIn.equals(TYPE_KICKSTART_INITIATE_GUEST)) {
else if (typeIn.equals(TYPE_DAEMON_CONFIG)) {
retval = new DaemonConfigAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_SHUTDOWN)) {
retval = new VirtualizationShutdownGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_START)) {
retval = new VirtualizationStartGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_SUSPEND)) {
retval = new VirtualizationSuspendGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_RESUME)) {
retval = new VirtualizationResumeGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_REBOOT)) {
retval = new VirtualizationRebootGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_DESTROY)) {
retval = new VirtualizationDestroyGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_DELETE)) {
retval = new VirtualizationDeleteGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_SET_MEMORY)) {
retval = new VirtualizationSetMemoryGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_SET_VCPUS)) {
retval = new VirtualizationSetVcpusGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_GUEST_MIGRATE)) {
retval = new VirtualizationMigrateGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_SCHEDULE_POLLER)) {
retval = new VirtualizationSchedulePollerAction();
}
else if (typeIn.equals(TYPE_VIRTIZATION_HOST_SUBSCRIBE_TO_TOOLS_CHANNEL)) {
retval = new KickstartHostToolsChannelSubscriptionAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_GUEST_SUBSCRIBE_TO_TOOLS_CHANNEL)) {
retval = new KickstartGuestToolsChannelSubscriptionAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_CREATE)) {
retval = new VirtualizationCreateGuestAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_POOL_REFRESH)) {
retval = new VirtualizationPoolRefreshAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_POOL_START)) {
retval = new VirtualizationPoolStartAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_POOL_STOP)) {
retval = new VirtualizationPoolStopAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_POOL_DELETE)) {
retval = new VirtualizationPoolDeleteAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_POOL_CREATE)) {
retval = new VirtualizationPoolCreateAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_VOLUME_DELETE)) {
retval = new BaseVirtualizationVolumeAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_NETWORK_STATE_CHANGE)) {
retval = new VirtualizationNetworkStateChangeAction();
}
else if (typeIn.equals(TYPE_VIRTUALIZATION_NETWORK_CREATE)) {
retval = new VirtualizationNetworkCreateAction();
}
else if (typeIn.equals(TYPE_SCAP_XCCDF_EVAL)) {
retval = new ScapAction();
}
Expand Down
Loading

0 comments on commit 87408c9

Please sign in to comment.