File no-allowed-adr-pairs.diff of Package python-neutronclient

Index: python-neutronclient-2.3.12/neutronclient/neutron/v2_0/port.py
===================================================================
--- python-neutronclient-2.3.12.orig/neutronclient/neutron/v2_0/port.py
+++ python-neutronclient-2.3.12/neutronclient/neutron/v2_0/port.py
@@ -265,8 +265,25 @@ class UpdatePort(neutronV20.UpdateComman
             choices=['True', 'False'],
             help=argparse.SUPPRESS)
         self.add_arguments_secgroup(parser)
         self.add_arguments_extradhcpopt(parser)
+        group_aap = parser.add_mutually_exclusive_group()
+        group_aap.add_argument(
+            '--allowed-address-pair',
+            metavar='ip_address=IP_ADDR[,mac_address=MAC_ADDR]',
+            default=[],
+            action='append',
+            dest='allowed_address_pairs',
+            type=utils.str2dict_type(
+                required_keys=['ip_address'],
+                optional_keys=['mac_address']),
+            help=_('Allowed address pair associated with the port.'
+                   ' You can repeat this option.'
+		   ' Does not yet work, use --allowed-address-pairs type=dict list=true'))
+        group_aap.add_argument(
+            '--no-allowed-address-pairs',
+            action='store_true',
+            help=_('Associate no allowed address pairs with the port.'))
 
     def args2body(self, parsed_args):
         body = {'port': {}}
         client = self.get_client()
@@ -275,5 +292,9 @@ class UpdatePort(neutronV20.UpdateComman
             body['port'].update({'admin_state_up':
                                 parsed_args.admin_state_up})
         self.args2body_secgroup(parsed_args, body['port'])
         self.args2body_extradhcpopt(parsed_args, body['port'])
+        if parsed_args.no_allowed_address_pairs:
+            body['port']['allowed_address_pairs'] = []
+        elif parsed_args.allowed_address_pairs:
+            body['port']['allowed_address_pairs'] = parsed_args.allowed_address_pairs
         return body