Search in sources :

Example 1 with ApplicationId

use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.

the class DistributedK8sIpamStore method activate.

@Activate
protected void activate() {
    ApplicationId appId = coreService.registerApplication(APP_ID);
    allocatedStore = storageService.<String, K8sIpam>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_IPAM)).withName("k8s-ipam-allocated-store").withApplicationId(appId).build();
    availableStore = storageService.<String, K8sIpam>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_IPAM)).withName("k8s-ipam-available-store").withApplicationId(appId).build();
    log.info("Started");
}
Also used : ApplicationId(org.onosproject.core.ApplicationId) Activate(org.osgi.service.component.annotations.Activate)

Example 2 with ApplicationId

use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.

the class DistributedK8sNetworkPolicyStore method activate.

@Activate
protected void activate() {
    ApplicationId appId = coreService.registerApplication(APP_ID);
    networkPolicyStore = storageService.<String, NetworkPolicy>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_NETWORK_POLICY)).withName("k8s-network-policy-store").withApplicationId(appId).build();
    networkPolicyStore.addListener(networkPolicyMapListener);
    log.info("Started");
}
Also used : ApplicationId(org.onosproject.core.ApplicationId) Activate(org.osgi.service.component.annotations.Activate)

Example 3 with ApplicationId

use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.

the class DistributedK8sServiceStore method activate.

@Activate
protected void activate() {
    ApplicationId appId = coreService.registerApplication(APP_ID);
    serviceStore = storageService.<String, Service>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_SERVICE)).withName("k8s-service-store").withApplicationId(appId).build();
    serviceStore.addListener(serviceMapListener);
    log.info("Started");
}
Also used : ApplicationId(org.onosproject.core.ApplicationId) Activate(org.osgi.service.component.annotations.Activate)

Example 4 with ApplicationId

use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.

the class DistributedK8sHostStore method activate.

@Activate
protected void activate() {
    ApplicationId appId = coreService.registerApplication(APP_ID);
    hostStore = storageService.<String, K8sHost>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_HOST)).withName("k8s-hoststore").withApplicationId(appId).build();
    hostStore.addListener(hostMapListener);
    log.info("Started");
}
Also used : ApplicationId(org.onosproject.core.ApplicationId) Activate(org.osgi.service.component.annotations.Activate)

Example 5 with ApplicationId

use of org.onosproject.core.ApplicationId in project onos by opennetworkinglab.

the class DistributedK8sApiConfigStore method activate.

@Activate
protected void activate() {
    ApplicationId appId = coreService.registerApplication(APP_ID);
    apiConfigStore = storageService.<String, K8sApiConfig>consistentMapBuilder().withSerializer(Serializer.using(SERIALIZER_K8S_API_CONFIG)).withName("k8s-apiconfig-store").withApplicationId(appId).build();
    apiConfigStore.addListener(apiConfigMapListener);
    log.info("Started");
}
Also used : ApplicationId(org.onosproject.core.ApplicationId) Activate(org.osgi.service.component.annotations.Activate)

Aggregations

ApplicationId (org.onosproject.core.ApplicationId)135 CoreService (org.onosproject.core.CoreService)36 Activate (org.osgi.service.component.annotations.Activate)36 DefaultApplicationId (org.onosproject.core.DefaultApplicationId)25 Path (javax.ws.rs.Path)21 Produces (javax.ws.rs.Produces)16 ObjectNode (com.fasterxml.jackson.databind.node.ObjectNode)15 GET (javax.ws.rs.GET)14 Test (org.junit.Test)13 ApplicationAdminService (org.onosproject.app.ApplicationAdminService)11 FlowRuleService (org.onosproject.net.flow.FlowRuleService)11 Intent (org.onosproject.net.intent.Intent)11 ArrayNode (com.fasterxml.jackson.databind.node.ArrayNode)10 TrafficSelector (org.onosproject.net.flow.TrafficSelector)10 IntentService (org.onosproject.net.intent.IntentService)9 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 InputStream (java.io.InputStream)8 DeviceId (org.onosproject.net.DeviceId)8 TrafficTreatment (org.onosproject.net.flow.TrafficTreatment)8 ArrayList (java.util.ArrayList)7