How to loading initial data for openconfig-platform into CDB?
I install a new Confd Basic 7.6.
I complie the opencoifg/public YANG file to *.fxs and copy to $CONFD_DIR/etc/confd/.
How to initialize the openconfig-platform data for hardware inventory such as CPU、FAN、LINE_CARD … ?
I try to load $CONFD_DIR/var/confd/cdb/components_init.xml ,recieve the respone when run the command "confd --start-phase0 ":
CDB boot error: failed to load /media/vdb/tools/confd7.6/var/confd/cdb/components_init.xml:6: object is not writable: /oc-platform:components/oc-platform:component[oc-platform:name=‘4’]/oc-platform:state
components_init.xml:
<config>
<components xmlns="http://openconfig.net/yang/platform">
<component>
<name>4</name>
<state>
<name>N9K-X9732C-EXM</name>
<description>32x100G Ethernet Module</description>
<hardware-version>0.1230</hardware-version>
<id>4</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-18429-01</part-no>
<serial-no>FOC205114M4</serial-no>
<software-version>9.2(0.108)</software-version>
<type>LINECARD</type>
</state>
</component>
<component>
<name>1</name>
<state>
<name>N9K-X9732C-EXM</name>
<description>32x100G Ethernet Module</description>
<hardware-version>0.1220</hardware-version>
<id>1</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-18429-01</part-no>
<serial-no>FOC20444YCE</serial-no>
<software-version>9.2(0.108)</software-version>
<type>LINECARD</type>
</state>
</component>
<component>
<name>2</name>
<state>
<name>N9K-X9736C-FX</name>
<description>36x40/100G Ethernet Module</description>
<hardware-version>0.3030</hardware-version>
<id>2</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-18315-03</part-no>
<serial-no>FOC21127NR2</serial-no>
<software-version>9.2(0.108)</software-version>
<type>LINECARD</type>
</state>
</component>
<component>
<name>3</name>
<state>
<name>N9K-X9736C-FX</name>
<description>36x40/100G Ethernet Module</description>
<hardware-version>0.3060</hardware-version>
<id>3</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-18315-03</part-no>
<serial-no>FOC21234PKU</serial-no>
<software-version>9.2(0.108)</software-version>
<type>LINECARD</type>
</state>
</component>
<component>
<name>25</name>
<state>
<id>25</id>
<type>FABRIC</type>
</state>
</component>
<component>
<name>21</name>
<state>
<id>21</id>
<type>FABRIC</type>
</state>
</component>
<component>
<name>26</name>
<state>
<name>N9K-C9504-FM-E</name>
<description>4-slot Fabric Module</description>
<hardware-version>1.0</hardware-version>
<id>26</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-17450-02</part-no>
<serial-no>SAL2024RSSH</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FABRIC</type>
</state>
</component>
<component>
<name>24</name>
<state>
<name>N9K-C9504-FM-E</name>
<description>4-slot Fabric Module</description>
<hardware-version>1.0</hardware-version>
<id>24</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-17450-02</part-no>
<serial-no>SAL2024RSSE</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FABRIC</type>
</state>
</component>
<component>
<name>23</name>
<state>
<name>N9K-C9504-FM-E</name>
<description>4-slot Fabric Module</description>
<hardware-version>1.0</hardware-version>
<id>23</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-17450-02</part-no>
<serial-no>FOC21070SAQ</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FABRIC</type>
</state>
</component>
<component>
<name>22</name>
<state>
<name>N9K-C9504-FM-E</name>
<description>4-slot Fabric Module</description>
<hardware-version>1.0</hardware-version>
<id>22</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>INACTIVE</oper-status>
<part-no>73-17450-02</part-no>
<serial-no>FOC21070RB9</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FABRIC</type>
</state>
</component>
<component>
<name>28</name>
<state>
<id>28</id>
<type>CPU</type>
</state>
</component>
<component>
<name>27</name>
<state>
<name>N9K-SUP-B</name>
<description>Supervisor Module</description>
<hardware-version>0.1020</hardware-version>
<id>27</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>02</part-no>
<serial-no>SAL1826VG0K</serial-no>
<software-version>9.2(0.108)</software-version>
<type>CPU</type>
</state>
</component>
<component>
<name>29</name>
<state>
<name>N9K-SC-A</name>
<description>System Controller</description>
<hardware-version>1.4</hardware-version>
<id>29</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-15294-02</part-no>
<serial-no>SAL1917DYUQ</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FRU</type>
</state>
</component>
<component>
<name>30</name>
<state>
<name>N9K-SC-A</name>
<description>System Controller</description>
<hardware-version>1.4</hardware-version>
<id>30</id>
<mfg-name>Cisco Systems, Inc.</mfg-name>
<oper-status>ACTIVE</oper-status>
<part-no>73-15294-02</part-no>
<serial-no>SAL1917DYTA</serial-no>
<software-version>9.2(0.108)</software-version>
<type>FRU</type>
</state>
</component>
</components>
</config>