Class SubnetServiceImpl

    • Constructor Detail

      • SubnetServiceImpl

        public SubnetServiceImpl()
    • Method Detail

      • list

        public List<? extends Subnet> list()
        List all the Subnet(s) which are authorized by the current Tenant
        Specified by:
        list in interface SubnetService
        Returns:
        the list of subnets or empty
      • get

        public Subnet get​(String subnetId)
        Gets a Subnet by ID
        Specified by:
        get in interface SubnetService
        Parameters:
        subnetId - the subnet identifier
        Returns:
        the Subnet or null if not found
      • delete

        public ActionResponse delete​(String subnetId)
        Delete a Subnet by ID
        Specified by:
        delete in interface SubnetService
        Parameters:
        subnetId - the subnet identifier to delete
        Returns:
        the action response
      • create

        public Subnet create​(Subnet subnet)
        Description copied from interface: SubnetService
        Creates a new Subnet
        Specified by:
        create in interface SubnetService
        Parameters:
        subnet - the subnet to create
        Returns:
        the newly created subnet
      • update

        public Subnet update​(Subnet subnet)
        Description copied from interface: SubnetService
        Updates a Subnet.

        Example:
        Subnet updateSN = update(existingSubnet.toBuilder().someChange(change).build());

        Specified by:
        update in interface SubnetService
        Parameters:
        subnet - the subnet to update
        Returns:
        the new subnet info
      • update

        public Subnet update​(String subnetId,
                             Subnet subnet)
        Description copied from interface: SubnetService
        This method is needed if you are updating a subnet without pre-fetching the subnet prior. See example at SubnetService.update(Subnet)
        Specified by:
        update in interface SubnetService
        Parameters:
        subnetId - the subnet identifier to update
        subnet - the subnet to update
        Returns:
        the updated subnet