~ubuntu-branches/ubuntu/vivid/neutron/vivid-updates

« back to all changes in this revision

Viewing changes to neutron/plugins/ml2/driver_api.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-03-30 11:17:19 UTC
  • mfrom: (1.1.21)
  • Revision ID: package-import@ubuntu.com-20150330111719-h0gx7233p4jkkgfh
Tags: 1:2015.1~b3-0ubuntu1
* New upstream milestone release:
  - d/control: Align version requirements with upstream.
  - d/control: Add new dependency on oslo-log.
  - d/p/*: Rebase.
  - d/control,d/neutron-plugin-hyperv*: Dropped, decomposed into
    separate project upstream.
  - d/control,d/neutron-plugin-openflow*: Dropped, decomposed into
    separate project upstream.
  - d/neutron-common.install: Add neutron-rootwrap-daemon and 
    neutron-keepalived-state-change binaries.
  - d/rules: Ignore neutron-hyperv-agent when installing; only for Windows.
  - d/neutron-plugin-cisco.install: Drop neutron-cisco-cfg-agent as
    decomposed into separate project upstream.
  - d/neutron-plugin-vmware.install: Drop neutron-check-nsx-config and
    neutron-nsx-manage as decomposed into separate project upstream.
  - d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent.
* d/pydist-overrides: Add overrides for oslo packages.
* d/control: Fixup type in package description (LP: #1263539).
* d/p/fixup-driver-test-execution.patch: Cherry pick fix from upstream VCS
  to support unit test exection in out-of-tree vendor drivers.
* d/neutron-common.postinst: Allow general access to /etc/neutron but limit
  access to root/neutron to /etc/neutron/neutron.conf to support execution
  of unit tests in decomposed vendor drivers.
* d/control: Add dependency on python-neutron-fwaas to neutron-l3-agent
  package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
NETWORK_TYPE = 'network_type'
26
26
PHYSICAL_NETWORK = 'physical_network'
27
27
SEGMENTATION_ID = 'segmentation_id'
 
28
MTU = 'mtu'
28
29
 
29
30
# The following keys are used in the binding level dictionaries
30
31
# available via the binding_levels and original_binding_levels
142
143
        """
143
144
        pass
144
145
 
 
146
    @abc.abstractmethod
 
147
    def get_mtu(self, physical):
 
148
        """Get driver's network MTU.
 
149
 
 
150
        :returns mtu: maximum transmission unit
 
151
 
 
152
        Returns the mtu for the network based on the config values and
 
153
        the network type.
 
154
        """
 
155
        pass
 
156
 
145
157
 
146
158
@six.add_metaclass(abc.ABCMeta)
147
159
class NetworkContext(object):
799
811
        """
800
812
        pass
801
813
 
 
814
    def check_vlan_transparency(self, context):
 
815
        """Check if the network supports vlan transparency.
 
816
 
 
817
        :param context: NetworkContext instance describing the network.
 
818
 
 
819
        Check if the network supports vlan transparency or not.
 
820
        """
 
821
        pass
 
822
 
802
823
 
803
824
@six.add_metaclass(abc.ABCMeta)
804
825
class ExtensionDriver(object):
831
852
        """
832
853
        pass
833
854
 
834
 
    def process_create_network(self, session, data, result):
 
855
    def process_create_network(self, plugin_context, data, result):
835
856
        """Process extended attributes for create network.
836
857
 
837
 
        :param session: database session
 
858
        :param plugin_context: plugin request context
838
859
        :param data: dictionary of incoming network data
839
860
        :param result: network dictionary to extend
840
861
 
841
 
        Called inside transaction context on session to validate and
842
 
        persist any extended network attributes defined by this
 
862
        Called inside transaction context on plugin_context.session to
 
863
        validate and persist any extended network attributes defined by this
843
864
        driver. Extended attribute values must also be added to
844
865
        result.
845
866
        """
846
867
        pass
847
868
 
848
 
    def process_create_subnet(self, session, data, result):
 
869
    def process_create_subnet(self, plugin_context, data, result):
849
870
        """Process extended attributes for create subnet.
850
871
 
851
 
        :param session: database session
 
872
        :param plugin_context: plugin request context
852
873
        :param data: dictionary of incoming subnet data
853
874
        :param result: subnet dictionary to extend
854
875
 
855
 
        Called inside transaction context on session to validate and
856
 
        persist any extended subnet attributes defined by this
 
876
        Called inside transaction context on plugin_context.session to
 
877
        validate and persist any extended subnet attributes defined by this
857
878
        driver. Extended attribute values must also be added to
858
879
        result.
859
880
        """
860
881
        pass
861
882
 
862
 
    def process_create_port(self, session, data, result):
 
883
    def process_create_port(self, plugin_context, data, result):
863
884
        """Process extended attributes for create port.
864
885
 
865
 
        :param session: database session
 
886
        :param plugin_context: plugin request context
866
887
        :param data: dictionary of incoming port data
867
888
        :param result: port dictionary to extend
868
889
 
869
 
        Called inside transaction context on session to validate and
870
 
        persist any extended port attributes defined by this
 
890
        Called inside transaction context on plugin_context.session to
 
891
        validate and persist any extended port attributes defined by this
871
892
        driver. Extended attribute values must also be added to
872
893
        result.
873
894
        """
874
895
        pass
875
896
 
876
 
    def process_update_network(self, session, data, result):
 
897
    def process_update_network(self, plugin_context, data, result):
877
898
        """Process extended attributes for update network.
878
899
 
879
 
        :param session: database session
 
900
        :param plugin_context: plugin request context
880
901
        :param data: dictionary of incoming network data
881
902
        :param result: network dictionary to extend
882
903
 
883
 
        Called inside transaction context on session to validate and
884
 
        update any extended network attributes defined by this
 
904
        Called inside transaction context on plugin_context.session to
 
905
        validate and update any extended network attributes defined by this
885
906
        driver. Extended attribute values, whether updated or not,
886
907
        must also be added to result.
887
908
        """
888
909
        pass
889
910
 
890
 
    def process_update_subnet(self, session, data, result):
 
911
    def process_update_subnet(self, plugin_context, data, result):
891
912
        """Process extended attributes for update subnet.
892
913
 
893
 
        :param session: database session
 
914
        :param plugin_context: plugin request context
894
915
        :param data: dictionary of incoming subnet data
895
916
        :param result: subnet dictionary to extend
896
917
 
897
 
        Called inside transaction context on session to validate and
898
 
        update any extended subnet attributes defined by this
 
918
        Called inside transaction context on plugin_context.session to
 
919
        validate and update any extended subnet attributes defined by this
899
920
        driver. Extended attribute values, whether updated or not,
900
921
        must also be added to result.
901
922
        """
902
923
        pass
903
924
 
904
 
    def process_update_port(self, session, data, result):
 
925
    def process_update_port(self, plugin_context, data, result):
905
926
        """Process extended attributes for update port.
906
927
 
907
 
        :param session: database session
 
928
        :param plugin_context: plugin request context
908
929
        :param data: dictionary of incoming port data
909
930
        :param result: port dictionary to extend
910
931
 
911
 
        Called inside transaction context on session to validate and
912
 
        update any extended port attributes defined by this
 
932
        Called inside transaction context on plugin_context.session to
 
933
        validate and update any extended port attributes defined by this
913
934
        driver. Extended attribute values, whether updated or not,
914
935
        must also be added to result.
915
936
        """
916
937
        pass
917
938
 
918
 
    def extend_network_dict(self, session, result):
 
939
    def extend_network_dict(self, session, base_model, result):
919
940
        """Add extended attributes to network dictionary.
920
941
 
921
942
        :param session: database session
 
943
        :param base_model: network model data
922
944
        :param result: network dictionary to extend
923
945
 
924
946
        Called inside transaction context on session to add any
928
950
        """
929
951
        pass
930
952
 
931
 
    def extend_subnet_dict(self, session, result):
 
953
    def extend_subnet_dict(self, session, base_model, result):
932
954
        """Add extended attributes to subnet dictionary.
933
955
 
934
956
        :param session: database session
 
957
        :param base_model: subnet model data
935
958
        :param result: subnet dictionary to extend
936
959
 
937
960
        Called inside transaction context on session to add any
941
964
        """
942
965
        pass
943
966
 
944
 
    def extend_port_dict(self, session, result):
 
967
    def extend_port_dict(self, session, base_model, result):
945
968
        """Add extended attributes to port dictionary.
946
969
 
947
970
        :param session: database session
 
971
        :param base_model: port model data
948
972
        :param result: port dictionary to extend
949
973
 
950
974
        Called inside transaction context on session to add any
951
975
        extended attributes defined by this driver to a port
952
 
        dictionary to be used for mechanism driver calls and/or
953
 
        returned as the result of a port operation.
 
976
        dictionary to be used for mechanism driver calls
 
977
        and/or returned as the result of a port operation.
954
978
        """
955
979
        pass