tools: nfdc face create output fix
NFD faces/create command response does not contain a Uri field, so nfdc face create output should not try to obtain canonical remote FaceUri from the command response. refs #3864 Change-Id: Idae4552e0e197257ea1277e12e20fe565a8562c6
This commit is contained in:
@@ -118,7 +118,6 @@ BOOST_AUTO_TEST_CASE(Normal)
|
||||
|
||||
ControlParameters resp;
|
||||
resp.setFaceId(2130)
|
||||
.setUri("udp4://159.242.33.78:6363")
|
||||
.setFacePersistency(FacePersistency::FACE_PERSISTENCY_PERSISTENT);
|
||||
this->succeedCommand(resp);
|
||||
};
|
||||
|
||||
@@ -87,15 +87,15 @@ FaceModule::create(ExecuteContext& ctx)
|
||||
[&] (const FaceUri& canonicalUri) {
|
||||
ctx.controller.start<ndn::nfd::FaceCreateCommand>(
|
||||
ControlParameters().setUri(canonicalUri.toString()).setFacePersistency(persistency),
|
||||
[&] (const ControlParameters& resp) {
|
||||
[&ctx, canonicalUri] (const ControlParameters& resp) {
|
||||
ctx.out << "face-created ";
|
||||
text::ItemAttributes ia;
|
||||
ctx.out << ia("id") << resp.getFaceId()
|
||||
<< ia("remote") << resp.getUri()
|
||||
<< ia("remote") << canonicalUri
|
||||
<< ia("persistency") << resp.getFacePersistency() << '\n';
|
||||
///\todo #3864 display localUri
|
||||
///\todo #3956 display local=localUri before 'remote' field
|
||||
},
|
||||
ctx.makeCommandFailureHandler("creating face"), ///\todo #3232 update persistency upon 409
|
||||
ctx.makeCommandFailureHandler("creating face"), ///\todo #3232 upgrade persistency if necessary upon 409
|
||||
ctx.makeCommandOptions());
|
||||
},
|
||||
[&] (const std::string& canonizeError) {
|
||||
|
||||
Reference in New Issue
Block a user