'Get the well defined extra specs.'

def _get_opts_from_specs(self, opts_capability, opts_value, opts_associate, specs):

    opts = {}
    opts.update(opts_capability)
    opts.update(opts_value)
    for (key, value) in specs.items():
        scope = None
        key_split = key.split(':')
        if ((len(key_split) > 2) and (key_split[0] != 'capabilities')):
            continue
        if (len(key_split) == 1):
            key = key_split[0].lower()
        else:
            scope = key_split[0].lower()
            key = key_split[1].lower()
        if (((not scope) or (scope == 'capabilities')) and (key in opts_capability)):
            words = value.split()
            if (words and (len(words) == 2) and (words[0] in ('<is>', '<in>'))):
                opts[key] = words[1].lower()
            elif (key == 'replication_type'):
                LOG.error("Extra    specs    must    be    specified    as    replication_type='<in>    sync'    or    '<in>    async'.")
            else:
                LOG.error("Extra    specs    must    be    specified    as    capabilities:%s='<is>    True'.", key)
        if ((scope in opts_capability) and (key in opts_value) and (scope in opts_associate) and (opts_associate[scope] == key)):
            opts[key] = value
    return opts
