'Returns a set of restricted actions.
For a given resource we get the set of restricted actions.
Actions are set in this format via `resources`:
"restricted_actions": [update, replace]
A restricted_actions value is either `update`, `replace` or a list
of those values. Resources support wildcard matching. The asterisk
sign matches everything.'

def get_rsrc_restricted_actions(self, resource_name):

    ress = self._registry['resources']
    restricted_actions = set()
    for (name_pattern, resource) in six.iteritems(ress):
        if fnmatch.fnmatchcase(resource_name, name_pattern):
            if ('restricted_actions' in resource):
                actions = resource['restricted_actions']
                if isinstance(actions, six.string_types):
                    restricted_actions.add(actions)
                elif isinstance(actions, collections.Sequence):
                    restricted_actions |= set(actions)
    return restricted_actions
