Re: <module>-impl project code file generation


Marek Gradzki <margradz@...>
 

+ honeycomb-dev@...
niedz., 9 wrz 2018 o 23:12 Marek Grądzki <margradz@...> napisał(a):


Saran,

the model looks valid.
I don't remember if I ever used top level list.
The ietf models used in hc2vpp have top level container defined.

Not sure if InstanceIdentifier provides methods suitable for your usecase,
but you might try to use KeyedInstanceIdentifier.builder.

InstanceIdentifer and KeyedInstanceIdentifier are concepts
from ODL Yangtools (https://wiki.opendaylight.org/view/YANG_Tools:Main)

Regards,
Marekśr., 5 wrz 2018 o 11:31 saravanan.a75@...
<saravanan.a75@...> napisał(a):

Hello Merek,

I am implementing impl classes for my Yang model.

I have a yang model in which “list fap-service “ is present immediately in “module bbf-tr-196-2-0-3-full”.
module bbf-tr-196-2-0-3-full {
list fap-service {
...
}
}

Hope this is valid yang model, I see a problem in honeycomb implementation for " final class FapServiceCrudService implements CrudService<FapService>".

@Override
public List<FapService> readAll() throws ReadFailedException {
LOG.info("RANSIM FapServiceCrudService readAll called");
// read all data under parent node,in this case {@link ModuleState}
return Collections.singletonList(
readSpecific(InstanceIdentifier.create(FapServices.class).child(FapService.class, new FapServiceKey("FapNode1"))));
}
}

What I should specify in the parent node class? If I have a top level container with name " fap-services " than, above code works. If we don't have such container what I should give as parent class?

Is honeycomb expect top level container always like below?

module bbf-tr-196-2-0-3-full {
container fap-services {
list fap-service {
...
}
}
}


Regards,
Saran


Sensitivity: Internal & Restricted

-----Original Message-----
From: Marek Grądzki [mailto:margradz@...]
Sent: Friday, August 31, 2018 11:55 AM
To: Saravanan A (Communications-Telecom Equipment) <saravanan.a75@...>
Cc: honeycomb-dev@...
Subject: Re: [honeycomb-dev] <module>-impl project code file generation

** This mail has been sent from an external source. Treat hyperlinks and attachments in this email with caution**

Hello Saran,

generating netconf agent based on custom model is not supported.

But feel free to create jira ticket if you are interested in the feature.
Contributions to design/implementation are welcomed!

Currently Honeycomb plugin archetype generates maven project structure, code and documentation only for the sample model (parametrized by root artifact id):
https://git.fd.io/honeycomb/tree/tools/archetype/src/main/resources/archetype-resources/__rootArtifactId__-api/src/main/yang/__rootArtifactId__.yang

Here is relevant patch where you can find more info:
https://gerrit.fd.io/r/#/c/2429/

You can find more examples in:
https://docs.fd.io/honeycomb/1.18.10-SNAPSHOT/release-notes-aggregator/release_notes.html#_devel_guide
https://git.fd.io/honeycomb/tree/samples

Please also take a look at https://wiki.fd.io/view/Hc2vpp which is Honeycomb agent for VPP.

Regards,
Marek

śr., 29 sie 2018 o 05:16 saravanan.a75@... <saravanan.a75@...> napisał(a):

Hello Team,



I am using honeycomb 18.07 version. Trying to bring up Netconf server for my own yang model file.



I modified the “honeycomb/enodebsim/enodebsim-api/src/main/yang/enodebsim.yang” file with my yang content.

Then I did the following:

$cd honeycomb/

$ rm enodebsim/pom.xml enodebsim/enodebsim-api/pom.xml

$ vi pom.xml #removed the enodebsim from Module list

$ mvn -X archetype:generate
-DarchetypeGroupId=io.fd.honeycomb.tools
-DarchetypeArtifactId=honeycomb-plugin-archetype
-DarchetypeVersion=1.18.10-SNAPSHOT -DinteractiveMode=false
-DgroupId=org.onap.ransim -DartifactId=enodebsim
-Dversion=1.0.0-SNAPSHOT -Dpackage=org.onap.ransim

$cd honeycomb/enodebsim/

$mvn clean install



This generated the java files for my new yang model. However the code generated in “honeycomb/enodebsim/enodebsim-impl” is not referring my new yang model. It still uses the old sample yang model.



Will the generate netconf agent automatically includes new yang model into capabilities?



Pls let me know if I missed any steps. If you can share the link/doc explaining what needs to be done for custom yang model simulation?





Regards,
Saran





Sensitivity: Internal & Restricted

The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any
attachments. WARNING: Computer viruses can be transmitted via email.
The recipient should check this email and any attachments for the
presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email. www.wipro.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#816):
https://lists.fd.io/g/honeycomb-dev/message/816
Mute This Topic: https://lists.fd.io/mt/25070762/675181
Group Owner: honeycomb-dev+owner@...
Unsubscribe: https://lists.fd.io/g/honeycomb-dev/unsub
[margradz@...]
-=-=-=-=-=-=-=-=-=-=-=-
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com

Join honeycomb-dev@lists.fd.io to automatically receive all group messages.