Package com.cloud.utils.component

Examples of com.cloud.utils.component.ComponentLocator$ComponentInfo


    throws ConfigurationException {
   
    if (s_logger.isInfoEnabled())
      s_logger.info("Start configuring console proxy alert manager : " + name);

    ComponentLocator locator = ComponentLocator.getCurrentLocator();

    _dcDao = locator.getDao(DataCenterDao.class);
    if (_dcDao == null) {
      throw new ConfigurationException("Unable to get " + DataCenterDao.class.getName());
    }
   
    _consoleProxyDao = locator.getDao(ConsoleProxyDao.class);
    if (_consoleProxyDao == null) {
      throw new ConfigurationException("Unable to get " + ConsoleProxyDao.class.getName());
    }
   
    _alertMgr = locator.getManager(AlertManager.class);
    if (_alertMgr == null) {
      throw new ConfigurationException("Unable to get " + AlertManager.class.getName());
    }
   
    try {
View Full Code Here


    }
  
  @Override
    public void execute(){
    try {
        ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
        NetworkUsageManager _networkUsageMgr = locator.getManager(NetworkUsageManager.class);
      boolean result = _networkUsageMgr.deleteTrafficMonitor(this);
      if (result) {
      SuccessResponse response = new SuccessResponse(getCommandName());
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
View Full Code Here

    }
  
  @Override
    public void execute(){
    try {
        ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
        NetworkUsageManager networkUsageMgr = locator.getManager(NetworkUsageManager.class);
      Host trafficMoinitor = networkUsageMgr.addTrafficMonitor(this);
      TrafficMonitorResponse response = networkUsageMgr.getApiResponse(trafficMoinitor);
      response.setObjectName("trafficmonitor");
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
View Full Code Here

    @Parameter(name=ApiConstants.VALUE, type=CommandType.STRING, required=true, description="configuration options for this command, which is seperated by ;")
    private String values;
   
    @Override
    public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
        ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
        SimulatorManager _simMgr = locator.getManager(SimulatorManager.class);
        boolean result = _simMgr.configureSimulator(zoneId, podId, clusterId, hostId, command, values);
        if (!result) {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to configure simulator");
        }
       
View Full Code Here

  @Override
  public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
      ResourceAllocationException {
    try {
      ExternalNetworkDeviceManager nwDeviceMgr;
      ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
      nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class);
      Host device = nwDeviceMgr.addNetworkDevice(this);
      NetworkDeviceResponse response = nwDeviceMgr.getApiResponse(device);
      response.setObjectName("networkdevice");
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
View Full Code Here

        return s_name;
    }

    @Override
    public void execute(){
        ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
        NetworkUsageManager networkUsageMgr = locator.getManager(NetworkUsageManager.class);
      List<? extends Host> trafficMonitors = networkUsageMgr.listTrafficMonitors(this);

        ListResponse<TrafficMonitorResponse> listResponse = new ListResponse<TrafficMonitorResponse>();
        List<TrafficMonitorResponse> responses = new ArrayList<TrafficMonitorResponse>();
        for (Host trafficMonitor : trafficMonitors) {
View Full Code Here

  @Override
  public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
      ResourceAllocationException {
    try {
      ExternalNetworkDeviceManager nwDeviceMgr;
      ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
      nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class);
      List<Host> devices = nwDeviceMgr.listNetworkDevice(this);
      List<NetworkDeviceResponse> nwdeviceResponses = new ArrayList<NetworkDeviceResponse>();
      ListResponse<NetworkDeviceResponse> listResponse = new ListResponse<NetworkDeviceResponse>();
      for (Host d : devices) {
        NetworkDeviceResponse response = nwDeviceMgr.getApiResponse(d);
View Full Code Here

  @Override
  public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
      ResourceAllocationException {
    try {
      ExternalNetworkDeviceManager nwDeviceMgr;
      ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
      nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class);
      boolean result = nwDeviceMgr.deleteNetworkDevice(this);
      if (result) {
        SuccessResponse response = new SuccessResponse(getCommandName());
        response.setResponseName(getCommandName());
        this.setResponseObject(response);
View Full Code Here

TOP

Related Classes of com.cloud.utils.component.ComponentLocator$ComponentInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.