Skip to content

Commit

Permalink
ZEN-33776 Move executables to libexec (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSushiChef authored Apr 8, 2024
1 parent 07f1ef2 commit c541e26
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 12 deletions.
9 changes: 0 additions & 9 deletions ZenPacks/zenoss/OpenStackInfrastructure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ def install(self, app):
# the config is updated if the script has changed.
force_update_configs(self, "proxy-zenopenstack", ["opt/zenoss/bin/proxy-zenopenstack"])



self.chmodScripts()

def getServiceDefinitionFiles(self):
# The default version of this is only called during initial installation,
# and returns all services. This version can be called during upgrades
Expand Down Expand Up @@ -136,11 +132,6 @@ def remove(self, app, leaveObjects=False):

remove_migrate_zenpython()

def chmodScripts(self):
for script in ('poll_openstack.py',
'openstack_amqp_init.py',
'openstack_helper.py'):
os.system('chmod 0755 {0}'.format(self.path(script)))

# Patch last to avoid import recursion problems.
from ZenPacks.zenoss.OpenStackInfrastructure import patches
Expand Down
2 changes: 1 addition & 1 deletion ZenPacks/zenoss/OpenStackInfrastructure/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

OPENSTACK_DEVICE_PATH = "/Devices/OpenStack/Infrastructure"

_helper = zenpack_path('openstack_helper.py')
_helper = zenpack_path('libexec/openstack_helper.py')

cmd_regex = re.compile('(--api_key=)(?P<password>[\wa-zA-Z0-9_.-]+)')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ CURRENTDIR="$(dirname "$(which "$0")")"
PARENTDIR=$(dirname $CURRENTDIR)

# Create any required exchanges
$PARENTDIR/openstack_amqp_init.py
$PARENTDIR/libexec/openstack_amqp_init.py
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ZenPacks/zenoss/OpenStackInfrastructure/zenpack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ device_classes:
cycletime: 300
openstack:
type: COMMAND
commandTemplate: ${here/ZenPackManager/packs/ZenPacks.zenoss.OpenStackInfrastructure/path}/poll_openstack.py
commandTemplate: ${here/ZenPackManager/packs/ZenPacks.zenoss.OpenStackInfrastructure/path}/libexec/poll_openstack.py
'${here/zCommandUsername}' '${here/zCommandPassword}' '${here/zOpenStackProjectId}'
'${here/zOpenStackUserDomainName}' '${here/zOpenStackProjectDomainName}' '${here/zOpenStackAuthUrl}' '${here/zOpenStackRegionName}'
datapoints:
Expand Down

0 comments on commit c541e26

Please sign in to comment.