use case/in/esac instead of if/then/fi to parse attributes

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
add NOTFOUND attributes

Signed-off-by: Masatake YAMATO <yamato@redhat.com>