def add_sliver_attribute(self, component_id, name, value, network=None):
        nodes = self.get_nodes({'component_id': '*%s*' % component_id})
        if nodes is not None and isinstance(nodes, list) and len(nodes) > 0:
            node = nodes[0]
            slivers = SFAv1Sliver.get_slivers(node)
            if slivers:
                sliver = slivers[0]
                SFAv1Sliver.add_sliver_attribute(sliver, name, value)
        else:
            # should this be an assert / raise an exception?
            logger.error("WARNING: failed to find component_id %s" % component_id)
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/sfa/rspecs/.oldversions/sfav1.py/SFAv1.add_sliver_attribute/original