2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 PACKAGES += " inventory"
23 #python-futurist >= 0.11.0
24 #python-keystoneauth1 >= 3.1.0
25 #python-keystonemiddleware >= 4.12.0
26 #python-neutronclient >= 6.3.0
27 #python-oslo-concurrency >= 3.8.0
28 #python-oslo-config >= 2:4.0.0
29 #python-oslo-context >= 2.14.0
30 #python-oslo-db >= 4.24.0
31 #python-oslo-i18n >= 2.1.0
32 #python-oslo-log >= 3.22.0
33 #python-oslo-messaging >= 5.24.2
34 #python-oslo-middleware >= 3.27.0
35 #python-oslo-policy >= 1.23.0
36 #python-oslo-rootwrap >= 5.0.0
37 #python-oslo-serialization >= 1.10.0
38 #python-oslo-service >= 1.10.0
39 #python-oslo-utils >= 3.20.0
40 #python-oslo-versionedobjects >= 1.17.0
41 #python-osprofiler >= 1.4.0
42 #python-stevedore >= 1.20.0
43 #python-webob >= 1.7.1
45 RDEPENDS_inventory += " \
56 python-keystoneauth1 \
57 python-keystonemiddleware \
58 python-neutronclient \
59 python-oslo.concurrency \
65 python-oslo.messaging \
66 python-oslo.middleware \
68 python-oslo.rootwrap \
69 python-oslo.serialization \
72 python-oslo.versionedobjects \
88 do_configure_prepend () {
89 cd ${S}/inventory/inventory
90 distutils_do_configure
93 do_compile_prepend () {
94 cd ${S}/inventory/inventory
98 do_install_prepend () {
99 cd ${S}/inventory/inventory
102 install -d -m 755 ${D}/${sysconfdir}/goenabled.d
103 install -p -D -m 755 etc/inventory/inventory_goenabled_check.sh ${D}/${sysconfdir}/goenabled.d/inventory_goenabled_check.sh
105 install -d -m 755 ${D}/${sysconfdir}/inventory
106 install -p -D -m 755 etc/inventory/policy.json ${D}/${sysconfdir}/inventory/policy.json
108 install -d -m 755 ${D}/${sysconfdir}/motd.d
109 install -p -D -m 755 etc/inventory/motd-system ${D}/${sysconfdir}/motd.d/10-system-config
111 install -m 755 -p -D scripts/inventory-api ${D}/${libdir}/ocf/resource.d/platform/inventory-api
112 install -m 755 -p -D scripts/inventory-conductor ${D}/${libdir}/ocf/resource.d/platform/inventory-conductor
114 install -d -m 0755 ${D}/${systemd_system_unitdir}/
115 install -m 644 -p -D scripts/inventory-api.service ${D}/${systemd_system_unitdir}/
116 install -m 644 -p -D scripts/inventory-conductor.service ${D}/${systemd_system_unitdir}/
118 # Install sql migration
119 # install -m 644 inventory/db/sqlalchemy/migrate_repo/migrate.cfg ${D}/${libdir}/inventory/db/sqlalchemy/migrate_repo/migrate.cfg
123 #pkg_postinst_ontarget-inventory () {
124 # install default config files
125 #cd ${_builddir}/${name}-${version} && oslo-config-generator --config-file inventory/config-generator.conf --output-file ${_builddir}/${name}-${version}/inventory.conf.sample
128 FILES_inventory = " \
129 ${systemd_system_unitdir}/inventory-api.service \
130 ${systemd_system_unitdir}/inventory-conductor.service \
131 ${bindir}/inventory-api \
132 ${bindir}/inventory-conductor \
133 ${bindir}/inventory-dnsmasq-lease-update \
134 ${bindir}/inventory-agent \
135 ${bindir}/inventory-dbsync \
136 ${libdir}/ocf/resource.d/platform/inventory-api \
137 ${libdir}/ocf/resource.d/platform/inventory-conductor \
138 ${libdir}/python2.7/site-packages/inventory*.egg-info/ \
139 ${libdir}/python2.7/site-packages/inventory/ \
140 ${sysconfdir}/goenabled.d/inventory_goenabled_check.sh \
141 ${sysconfdir}/motd.d/10-system-config \
142 ${sysconfdir}/inventory/policy.json \