'Define a snapshot view for the cgsnapshot
In order to define a snapshot view for a snapshot defined under a
consistency group, the view must be defined at the cgsnapshot
level.
:param cg_id: E-Series cg identifier
:param name: the label for the view
:param snap_id: E-Series snapshot view to locate
:raise NetAppDriverException: if the snapshot view cannot be
located for the snapshot identified
by snap_id
:return: snapshot view for snapshot identified by snap_id'

def create_cg_snapshot_view(self, cg_id, name, snap_id):

    path = self.RESOURCE_PATHS.get('cgroup_cgsnap_views')
    data = {'name': name, 'accessMode': 'readOnly', 'pitId': snap_id}
    cgsnapshot_view = self._invoke('POST', path, data, **{'object-id': cg_id})
    views = self.list_cg_snapshot_views(cg_id, cgsnapshot_view['cgViewRef'])
    for view in views:
        if (view['basePIT'] == snap_id):
            return view
    else:
        try:
            self.delete_cg_snapshot_view(cg_id, cgsnapshot_view['id'])
        finally:
            raise exception.NetAppDriverException('Unable    to    create    snapshot    view.')
