@staticmethod
def _extra_attributes_from_db_object(vnf_package, db_vnf_package,
    expected_attrs=None):
    """Method to help with migration of extra attributes to objects."""
    if expected_attrs is None:
        expected_attrs = []
    if 'vnf_deployment_flavours' in expected_attrs:
        vnf_package._load_vnf_deployment_flavours(db_vnf_package.get(
            'vnf_deployment_flavours'))
    if 'vnfd' in expected_attrs:
        vnf_package._load_vnfd(db_vnf_package.get('vnfd'))
