Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 137e8df

Browse files
authored
Merge pull request #249 from basepi/fixup
Fix for hubblestack_nova spm build
2 parents 10563b3 + 33bc2c2 commit 137e8df

21 files changed

+10
-8
lines changed

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ iterate policy changes separate from the code.
5656

5757
.. code-block:: shell
5858
59-
wget http://spm.hubblestack.io/nova/hubblestack_nova_modules-2016.9.1-1.spm
60-
spm local install hubblestack_nova_modules-2016.9.1-1.spm
59+
wget http://spm.hubblestack.io/nova/hubblestack_nova-2016.9.2.spm
60+
spm local install hubblestack_nova-2016.9.2.spm
6161
6262
**Nova Profiles**
6363

@@ -92,7 +92,7 @@ it to the minions.
9292
mkdir -p /srv/salt/_modules/
9393
cp _modules/hubble.py /srv/salt/_modules/
9494
cp -a hubblestack_nova_profiles /srv/salt/
95-
cp -a hubblestack_nova_modules /srv/salt/
95+
cp -a hubblestack_nova /srv/salt/
9696
9797
salt \* saltutil.sync_modules
9898
salt \* hubble.sync
@@ -127,7 +127,7 @@ Usage
127127

128128
There are four primary functions in the hubble.py module:
129129

130-
1. ``hubble.sync`` will sync the ``hubblestack_nova_profiles/`` and ``hubblestack_nova_modules/`` directories to the minion(s).
130+
1. ``hubble.sync`` will sync the ``hubblestack_nova_profiles/`` and ``hubblestack_nova/`` directories to the minion(s).
131131
2. ``hubble.load`` will load the synced audit modules and their yaml configuration files.
132132
3. ``hubble.audit`` will audit the minion(s) using the YAML profile(s) you provide as comma-separated arguments
133133
4. ``hubble.top`` will audit the minion(s) using the ``top.nova`` configuration.
@@ -276,7 +276,7 @@ configurable via pillar. The defaults are shown below:
276276
hubblestack:
277277
nova:
278278
saltenv: base
279-
module_dir: salt://hubblestack_nova_modules
279+
module_dir: salt://hubblestack_nova
280280
profile_dir: salt://hubblestack_nova_profiles
281281
282282
2. By default, ``hubble.audit`` will call ``hubble.load`` (which in turn calls

_modules/hubble.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def sync(clean=False):
420420
Sync the nova audit modules and profiles from the saltstack fileserver.
421421
422422
The modules should be stored in the salt fileserver. By default nova will
423-
search the base environment for a top level ``hubblestack_nova_modules``
423+
search the base environment for a top level ``hubblestack_nova``
424424
directory, unless otherwise specified via pillar or minion config
425425
(``hubblestack:nova:module_dir``)
426426
@@ -448,7 +448,7 @@ def sync(clean=False):
448448
nova_profile_dir = __salt__['config.get']('hubblestack:nova:profile_dir',
449449
'salt://hubblestack_nova_profiles')
450450
nova_module_dir = __salt__['config.get']('hubblestack:nova:module_dir',
451-
'salt://hubblestack_nova_modules')
451+
'salt://hubblestack_nova')
452452
saltenv = __salt__['config.get']('hubblestack:nova:saltenv', 'base')
453453

454454
# Clean previously synced files
@@ -519,7 +519,7 @@ def _hubble_dir():
519519
nova_profile_dir = __salt__['config.get']('hubblestack:nova:profile_dir',
520520
'salt://hubblestack_nova_profiles')
521521
nova_module_dir = __salt__['config.get']('hubblestack:nova:module_dir',
522-
'salt://hubblestack_nova_modules')
522+
'salt://hubblestack_nova')
523523
dirs = []
524524
# Support optional salt:// in config
525525
for nova_dir in (nova_module_dir, nova_profile_dir):
@@ -630,6 +630,8 @@ def refresh_file_mapping(self):
630630
# in the profiles directory. This is hacky but was a
631631
# quick fix.
632632
nova_module_cache, nova_profile_cache = _hubble_dir()
633+
nova_module_cache = os.path.join(nova_module_cache, '')
634+
nova_profile_cache = os.path.join(nova_profile_cache, '')
633635
if ext == '.py' and fpath.startswith(nova_profile_cache):
634636
continue
635637
if ext == '.yaml' and fpath.startswith(nova_module_cache):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)