def put(self, item_id):

        self.reqparse.add_argument('name', required=True, type=unicode, help='Must provide account name', location='json')
        self.reqparse.add_argument('cidr', required=True, type=unicode, help='Network CIDR required.', location='json')
        self.reqparse.add_argument('notes', required=False, type=unicode, help='Add context.', location='json')
        args = self.reqparse.parse_args()

        name = args['name']
        cidr = args.get('cidr', True)
        notes = args.get('notes', None)

        result = NetworkWhitelistEntry.query.filter(NetworkWhitelistEntry.id == item_id).first()

        if not result:
            return {"status": "Whitelist entry with the given ID not found."}, 404

        result.name = name
        result.cidr = cidr
        result.notes = notes

        db.session.add(result)
        db.session.commit()
        db.session.refresh(result)

        whitelistentry_marshaled = marshal(result.__dict__, WHITELIST_FIELDS)
        whitelistentry_marshaled['auth'] = self.auth_dict

        return whitelistentry_marshaled, 200
.. http:get:: /api/1/whitelistcidrs/<int:id>
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/views/whitelist.py/WhitelistGetPutDelete.put