Deal with local unfound elements gracefully;
Passing PF names into the portable foundation.
Re-org'ed to share function among CPA, rest server.

Signed-off-by: Liming <mistersky@gmail.com>
Merge "Deal with local unfound elements gracefully; Passing PF names into the portable foundation. Re-org'ed to share function among CPA, rest server."