@Service public class SubnetManager extends Object implements SubnetService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.core.ApplicationId |
appId |
protected org.onosproject.core.CoreService |
coreService |
protected org.onosproject.store.service.StorageService |
storageService |
protected Map<SubnetId,Subnet> |
subnetStore |
protected TenantNetworkService |
tenantNetworkService |
| Constructor and Description |
|---|
SubnetManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
boolean |
createSubnets(Iterable<Subnet> subnets)
Creates new subnets.
|
void |
deactivate() |
boolean |
exists(SubnetId subnetId)
Returns the subnet with the specified identifier.
|
Subnet |
getSubnet(SubnetId subnetId)
Returns the subnet with the specified identifier.
|
Iterable<Subnet> |
getSubnets()
Returns a collection of the currently known subnets.
|
boolean |
removeSubnets(Iterable<SubnetId> subnetIds)
Administratively removes the specified subnets from the store.
|
boolean |
updateSubnets(Iterable<Subnet> subnets)
Updates existing subnets.
|
protected org.onosproject.core.ApplicationId appId
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Reference(cardinality=MANDATORY_UNARY) protected TenantNetworkService tenantNetworkService
@Activate public void activate()
@Deactivate public void deactivate()
public Iterable<Subnet> getSubnets()
SubnetServicegetSubnets in interface SubnetServicepublic Subnet getSubnet(SubnetId subnetId)
SubnetServicegetSubnet in interface SubnetServicesubnetId - subnet identifierpublic boolean exists(SubnetId subnetId)
SubnetServiceexists in interface SubnetServicesubnetId - subnet identifierpublic boolean createSubnets(Iterable<Subnet> subnets)
SubnetServicecreateSubnets in interface SubnetServicesubnets - the iterable collection of subnetspublic boolean updateSubnets(Iterable<Subnet> subnets)
SubnetServiceupdateSubnets in interface SubnetServicesubnets - the iterable collection of subnetspublic boolean removeSubnets(Iterable<SubnetId> subnetIds)
SubnetServiceremoveSubnets in interface SubnetServicesubnetIds - the iterable collection of subnets identifier