'Adds an RDS instance to the inventory and index, as long as it is
addressable'

def add_rds_instance(self, instance, region):

    if (instance.status != 'available'):
        return
    dest = instance.endpoint[0]
    if (not dest):
        return
    self.index[dest] = [region, instance.id]
    self.inventory[instance.id] = [dest]
    self.push(self.inventory, region, dest)
    self.push(self.inventory, instance.availability_zone, dest)
    self.push(self.inventory, self.to_safe(('type_' + instance.instance_class)), dest)
    try:
        if instance.security_group:
            key = self.to_safe(('security_group_' + instance.security_group.name))
            self.push(self.inventory, key, dest)
    except AttributeError:
        print 'Package    boto    seems    a    bit    older.'
        print 'Please    upgrade    boto    >=    2.3.0.'
        sys.exit(1)
    self.push(self.inventory, self.to_safe(('rds_' + instance.engine)), dest)
    self.push(self.inventory, self.to_safe(('rds_parameter_group_' + instance.parameter_group.name)), dest)
