Examples of PortProfileVO


Examples of com.cloud.network.dao.PortProfileVO

     
      // TODO: Should we also check whether a port profile for the specified vlanId already exists, and if so,
      // fail this function? Do we want to enforce such a 1:1 mapping b/w port profile and vlanId?
     
      // Else, go ahead and create the port profile.
      PortProfileVO portProfileObj = new PortProfileVO(portProfName, vsmId, vlanId, pType, bType);

      Transaction txn = Transaction.currentTxn();
      try {
        txn.start();
        _portProfileDao.persist(portProfileObj);
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

    public PortProfileVO addPortProfile(String portProfName, long vsmId, int lowVlanId, int highVlanId, PortType pType, BindingType bType) {

      // In this function, we create a port profile record in the port_profile table.
     
      // First, check if a port profile with the given name already exists. If it does, throw an exception.           
      PortProfileVO portProfileObj;
     
      portProfileObj = _portProfileDao.findByName(portProfName);
     
      if (portProfileObj != null) {
        s_logger.info("Port Profile with specified name: " + portProfName + " already exists");
        throw new InvalidParameterValueException("Port Profile with specified name: " + portProfName + " already exists");
      }

      // Next, check if there is any existing port profile that uses a VLAN ID range that clashes with the
      // range passed to this function. If so, throw an exception.
     
      if (_portProfileDao.doesVlanRangeClash(lowVlanId, highVlanId) == true) {
        s_logger.info("Port Profile's vlanId range clashes with an existing Port Profile's");
        throw new InvalidParameterValueException("Port Profile's vlanId range clashes with an existing Port Profile's");
      }     
     
      // Else, go ahead and create the port profile.
      portProfileObj = new PortProfileVO(portProfName, vsmId, lowVlanId, highVlanId, pType, bType);

      Transaction txn = Transaction.currentTxn();
      try {
        txn.start();
        _portProfileDao.persist(portProfileObj);
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

        return portProfileObj;       
    }
   
    @DB
    public boolean deletePortProfile(long portProfileId) {
        PortProfileVO ppObj = _portProfileDao.findById(portProfileId);
        if (ppObj == null) {
          // This entry is already not present. Return success.
          return true;
        }
       
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

        // TODO: Should we also check whether a port profile for the specified vlanId already exists, and if so,
        // fail this function? Do we want to enforce such a 1:1 mapping b/w port profile and vlanId?

        // Else, go ahead and create the port profile.
        PortProfileVO portProfileObj = new PortProfileVO(portProfName, vsmId, vlanId, pType, bType);

        return _portProfileDao.persist(portProfileObj);
    }
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

    public PortProfileVO addPortProfile(String portProfName, long vsmId, int lowVlanId, int highVlanId, PortType pType, BindingType bType) {

        // In this function, we create a port profile record in the port_profile table.

        // First, check if a port profile with the given name already exists. If it does, throw an exception.
        PortProfileVO portProfileObj;

        portProfileObj = _portProfileDao.findByName(portProfName);

        if (portProfileObj != null) {
            s_logger.info("Port Profile with specified name: " + portProfName + " already exists");
            throw new InvalidParameterValueException("Port Profile with specified name: " + portProfName + " already exists");
        }

        // Next, check if there is any existing port profile that uses a VLAN ID range that clashes with the
        // range passed to this function. If so, throw an exception.

        if (_portProfileDao.doesVlanRangeClash(lowVlanId, highVlanId) == true) {
            s_logger.info("Port Profile's vlanId range clashes with an existing Port Profile's");
            throw new InvalidParameterValueException("Port Profile's vlanId range clashes with an existing Port Profile's");
        }

        // Else, go ahead and create the port profile.
        portProfileObj = new PortProfileVO(portProfName, vsmId, lowVlanId, highVlanId, pType, bType);

        return _portProfileDao.persist(portProfileObj);
    }
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

        return _portProfileDao.persist(portProfileObj);
    }

    @DB
    public boolean deletePortProfile(long portProfileId) {
        PortProfileVO ppObj = _portProfileDao.findById(portProfileId);
        if (ppObj == null) {
            // This entry is already not present. Return success.
            return true;
        }
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

     
      // TODO: Should we also check whether a port profile for the specified vlanId already exists, and if so,
      // fail this function? Do we want to enforce such a 1:1 mapping b/w port profile and vlanId?
     
      // Else, go ahead and create the port profile.
      PortProfileVO portProfileObj = new PortProfileVO(portProfName, vsmId, vlanId, pType, bType);

    return _portProfileDao.persist(portProfileObj);
    }
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

    public PortProfileVO addPortProfile(String portProfName, long vsmId, int lowVlanId, int highVlanId, PortType pType, BindingType bType) {

      // In this function, we create a port profile record in the port_profile table.
     
      // First, check if a port profile with the given name already exists. If it does, throw an exception.           
      PortProfileVO portProfileObj;
     
      portProfileObj = _portProfileDao.findByName(portProfName);
     
      if (portProfileObj != null) {
        s_logger.info("Port Profile with specified name: " + portProfName + " already exists");
        throw new InvalidParameterValueException("Port Profile with specified name: " + portProfName + " already exists");
      }

      // Next, check if there is any existing port profile that uses a VLAN ID range that clashes with the
      // range passed to this function. If so, throw an exception.
     
      if (_portProfileDao.doesVlanRangeClash(lowVlanId, highVlanId) == true) {
        s_logger.info("Port Profile's vlanId range clashes with an existing Port Profile's");
        throw new InvalidParameterValueException("Port Profile's vlanId range clashes with an existing Port Profile's");
      }     
     
      // Else, go ahead and create the port profile.
      portProfileObj = new PortProfileVO(portProfName, vsmId, lowVlanId, highVlanId, pType, bType);

    return _portProfileDao.persist(portProfileObj);
    }
View Full Code Here

Examples of com.cloud.network.dao.PortProfileVO

    return _portProfileDao.persist(portProfileObj);
    }
   
    @DB
    public boolean deletePortProfile(long portProfileId) {
        PortProfileVO ppObj = _portProfileDao.findById(portProfileId);
        if (ppObj == null) {
          // This entry is already not present. Return success.
          return true;
        }
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.