Hi Tom & Controller-Dev team,

I have made some progress with the toaster and currently working on 5/7
part (Adding a consumer of ToasterService) as per the step-by-step
tutorial. I have run into a problem after adding a consumer to my
application. Before I added the blueprint.xml file for consumer, the code
for consumer was building fine along with the aggregator application. Now,
I am getting a SingleFeatureTest error on building the application which
says that my consumer bundle has *OSGi state = Active, Karaf bundleState =
GracePeriod, due to: Blueprint* and that it is *missing the
"org.opendaylight.controller.sal.binding.api.RpcProviderRegistry".* I don't
think the consumer will need an RpcProviderRegistry though, as I am not
defining any yang-based service in the consumer that needs to be
implemented.

I am attaching the build error, the consumer blueprint XML and my features
XML. Please let me know if you need any other information. I will really
appreciate any help as I have been struggling with this for quite some time
now. I look forward to your response.


Thanks,
Pranjal

<https://www.linkedin.com/in/pranjalsharma/>

On Wed, Jun 13, 2018 at 2:48 AM, Pranjal Sharma <pranjalsharma3...@gmail.com
> wrote:

> Tom,
>
> Thanks a lot for the clarification. I will do as suggested.
>
> Best,
> Pranjal
>
>
>
> On Fri, 8 Jun 2018 at 7:53 PM, Tom Pantelis <tompante...@gmail.com> wrote:
>
>> Pranjal,
>>
>> The archetype generates initial suggested directories. There's really no
>> rules on how to organize the code - in the end it's your code and up to
>> you. The toaster example has the RPC implementation in a provider bundle
>> and an RPC user in a consumer bundle but it's just an example. If you have
>> RPCs, the user/consumer may just be the NB restconf.
>>
>> Tom
>>
>> On Fri, Jun 8, 2018 at 12:52 AM, Pranjal Sharma <
>> pranjalsharma3...@gmail.com> wrote:
>>
>>> Hi All,
>>>
>>> I hope you are doing well. I am fairly new to the OpenDaylight framework
>>> and trying to get a finer understanding of the MD-SAL infrastructure. To
>>> get started, I am trying to develop the complete *Toaster* example from
>>> scratch using *odl-startup-archetype*. I am following the tutorial:
>>> https://wiki.opendaylight.org/view/OpenDaylight_Controller:
>>> MD-SAL:Toaster_Step-By-Step.
>>>
>>> Before starting the Toaster example, I have developed a simple MD-SAL
>>> application that had a provider but no in-project consumer. So, I used to
>>> put all the yangs in *api* directory, and the providers in the *impl*
>>> directory generated by the odl-startup archetype.
>>>
>>> With Toaster, I am struggling to understand where to place the consumer
>>> in the directory structure generated by the odl-startup-archetype. Does the
>>> Consumer go into the *impl* directory too (probably in a sub-directory
>>> for consumer), as it is exposing some functionality itself? I have seen the
>>> code of Toaster on GitHub, but that didn't clarify my doubt.
>>>
>>> I will really appreciate any help regarding this. I look forward to your
>>> response in the matter.
>>>
>>>
>>> Thanks,
>>> Pranjal Sharma
>>>
>>>
>>>
>>> _______________________________________________
>>> controller-dev mailing list
>>> controller-dev@lists.opendaylight.org
>>> https://lists.opendaylight.org/mailman/listinfo/controller-dev
>>>
>>>
>> --
> Thanks,
> Pranjal
>
> <https://www.linkedin.com/in/pranjalsharma/>
>
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2017 Pranjal Sharma and others. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0";
  odl:use-default-for-reference-types="true">

  <!-- Retrieves the RPC service for the OdlToasterService interface -->
  <odl:rpc-service id="odltoasterService" interface="org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.toaster.rev180618.OdltoasterService"/>

  <!-- Create the KitchenServiceImpl instance and inject the RPC identified by "toasterService" -->
  <bean id="kitchenService" class="kitchen.impl.KitchenServiceImpl" init-method="register" destroy-method="unregister">
    <argument ref="odltoasterService"/>
  </bean>
  <!-- Advertise the KitchenServiceImpl with the OSGi registry with the type property set to "default" . The
         type property is optional but can be used to distinguish this implementation from any other potential
         KitchenService implementations (if there were any). Clients consuming the KitchenService can pick the
         desired implementation via the particular type.
    -->
  <service ref="kitchenService" interface=" kitchen.api.KitchenService"
           odl:type="default"/>
</blueprint>
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=4 tabstop=4: -->
<!--
Copyright © 2017 Pranjal Sharma and others. All rights reserved.

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v1.0 which accompanies this distribution,
and is available at http://www.eclipse.org/legal/epl-v10.html
-->
<features name="odl-odltoaster-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0";>
  <repository>mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features</repository>
  <repository>mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features</repository>
  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features</repository>
  <repository>mvn:org.opendaylight.netconf/features-restconf/{{VERSION}}/xml/features</repository>
  <repository>mvn:org.opendaylight.dluxapps/features-dluxapps/{{VERSION}}/xml/features</repository>
  <feature name='odl-odltoaster-api' version='${project.version}' description='OpenDaylight :: odltoaster :: api'>
    <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
    <bundle>mvn:com.ps.odl/odltoaster-api/{{VERSION}}</bundle>
  </feature>
  <feature name='odl-odltoaster-provider' version='${project.version}' description='OpenDaylight :: odltoaster :: provider'>
    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
    <feature version='${project.version}'>odl-odltoaster-api</feature>
    <bundle>mvn:com.ps.odl/toaster-provider/{{VERSION}}</bundle>
  </feature>
  <feature name='odl-odltoaster-consumer' version='${project.version}' description='OpenDaylight :: odltoaster :: consumer'>
    <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
    <feature version='${project.version}'>odl-odltoaster-api</feature>
    <bundle>mvn:com.ps.odl/toaster-consumer/{{VERSION}}</bundle>
  </feature>
  <feature name='odl-odltoaster-rest' version='${project.version}' description='OpenDaylight :: odltoaster :: REST'>
    <feature version="${project.version}">odl-odltoaster-provider</feature>
    <feature version="${restconf.version}">odl-restconf</feature>
  </feature>
  <feature name='odl-odltoaster-ui' version='${project.version}' description='OpenDaylight :: odltoaster :: UI'>
    <feature version="${project.version}">odl-odltoaster-rest</feature>
    <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
    <feature version="${dluxapps.version}">odl-dluxapps-yangman</feature>
  </feature>
  <feature name='odl-odltoaster-cli' version='${project.version}' description='OpenDaylight :: odltoaster :: CLI'>
    <feature version="${project.version}">odl-odltoaster-provider</feature>
    <bundle>mvn:com.ps.odl/odltoaster-cli/{{VERSION}}</bundle>
  </feature>

</features>

Attachment: error
Description: Binary data

_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to