2 * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.netvirt.openstack.netvirt.translator.crud.impl;
11 import java.util.List;
12 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
13 import org.opendaylight.netvirt.openstack.netvirt.translator.INeutronObject;
14 import org.opendaylight.netvirt.openstack.netvirt.translator.NeutronFirewallRule;
15 import org.opendaylight.netvirt.openstack.netvirt.translator.crud.INeutronFirewallRuleCRUD;
16 import org.opendaylight.yangtools.yang.binding.DataObject;
17 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
18 import org.osgi.framework.BundleContext;
19 import org.osgi.framework.ServiceRegistration;
21 public class NeutronFirewallRuleInterface extends AbstractNeutronInterface implements INeutronFirewallRuleCRUD {
23 NeutronFirewallRuleInterface(DataBroker dataBroker) {
28 public boolean neutronFirewallRuleExists(String uuid) {
29 // TODO Auto-generated method stub
34 public NeutronFirewallRule getNeutronFirewallRule(String uuid) {
35 // TODO Auto-generated method stub
40 public List<NeutronFirewallRule> getAllNeutronFirewallRules() {
41 // TODO Auto-generated method stub
46 public boolean addNeutronFirewallRule(NeutronFirewallRule input) {
47 // TODO Auto-generated method stub
52 public boolean removeNeutronFirewallRule(String uuid) {
53 // TODO Auto-generated method stub
58 public boolean updateNeutronFirewallRule(String uuid,
59 NeutronFirewallRule delta) {
60 // TODO Auto-generated method stub
65 public boolean neutronFirewallRuleInUse(String uuid) {
66 // TODO Auto-generated method stub
71 protected InstanceIdentifier createInstanceIdentifier(DataObject item) {
72 // TODO Auto-generated method stub
77 protected DataObject toMd(INeutronObject neutronObject) {
78 // TODO Auto-generated method stub
83 protected DataObject toMd(String uuid) {
84 // TODO Auto-generated method stub
88 public static void registerNewInterface(BundleContext context,
89 final DataBroker dataBroker,
90 List<ServiceRegistration<?>> registrations) {
91 NeutronFirewallRuleInterface neutronFirewallRuleInterface = new NeutronFirewallRuleInterface(dataBroker);
92 ServiceRegistration<INeutronFirewallRuleCRUD> neutronFirewallRuleInterfaceRegistration = context.registerService(INeutronFirewallRuleCRUD.class, neutronFirewallRuleInterface, null);
93 if(neutronFirewallRuleInterfaceRegistration != null) {
94 registrations.add(neutronFirewallRuleInterfaceRegistration);