View Javadoc

1   /*
2    * Copyright (c) 2014 Cisco Systems, Inc.  All rights reserved.
3    *
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
7    */
8   
9   package org.opendaylight.lispflowmapping.neutron;
10  
11  import java.net.HttpURLConnection;
12  
13  import org.opendaylight.neutron.spi.INeutronNetworkAware;
14  import org.opendaylight.neutron.spi.NeutronNetwork;
15  
16  /**
17   * LISP Service Implementation of NeutronNetworkAware API
18   *
19   */
20  public class LispNeutronNetworkHandler extends LispNeutronService implements INeutronNetworkAware {
21  
22  
23  	@Override
24  	public int canCreateNetwork(NeutronNetwork network) {
25          LOG.info("Neutron canCreateNetwork : Network name: " + network.getNetworkName());
26          LOG.debug("Lisp Neutron Network: " + network.toString());
27  
28          return HttpURLConnection.HTTP_OK;
29  	}
30  
31  	@Override
32  	public void neutronNetworkCreated(NeutronNetwork network) {
33          LOG.info("Neutron Network Created : Network name: " + network.getNetworkName());
34          LOG.debug("Lisp Neutron Network: " + network.toString());
35  
36  	}
37  
38  	@Override
39  	public int canUpdateNetwork(NeutronNetwork delta, NeutronNetwork original) {
40          LOG.info("Neutron canUpdateNetwork : Network name: " + original.getNetworkName());
41          LOG.debug("Lisp Neutron Network: " + original.toString());
42  
43          return HttpURLConnection.HTTP_OK;
44  	}
45  
46  	@Override
47  	public void neutronNetworkUpdated(NeutronNetwork network) {
48          LOG.info("Neutron Network Updated : Network name: " + network.getNetworkName());
49          LOG.debug("Lisp Neutron Network: " + network.toString());
50  
51  	}
52  
53  	@Override
54  	public int canDeleteNetwork(NeutronNetwork network) {
55          LOG.info("Neutron canDeleteNetwork : Network name: " + network.getNetworkName());
56          LOG.debug("Lisp Neutron Network: " + network.toString());
57  
58          return HttpURLConnection.HTTP_OK;
59  	}
60  
61  	@Override
62  	public void neutronNetworkDeleted(NeutronNetwork network) {
63          LOG.info("Neutron Network Deleted : Network name: " + network.getNetworkName());
64          LOG.debug("Lisp Neutron Network: " + network.toString());
65  
66          return;
67  	}
68  
69  }