Tests

Powerpack Tests

pp_standards_tests.tests.test_powerpack.get_duplicated_libraries(libraries)

Collect libraries that are repeated on the list of libraries.

Parameters:

libraries – library objects in a list

Returns:

list(dict): list of dictionaries with basic information for each repeated library

pp_standards_tests.tests.test_powerpack.pp_version_fix(powerpack)

NOTE: This test has not been implemented yet.

Keep PP version number unchanged when fixing defects introduced in same release cycle. NOTE: Obsolete - Assumes, version number in pp config file is correct.

pp_standards_tests.tests.test_powerpack.rule_pp_base_name(name)
pp_standards_tests.tests.test_powerpack.rule_pp_credential_example(creds)
pp_standards_tests.tests.test_powerpack.rule_pp_description(description)
pp_standards_tests.tests.test_powerpack.rule_pp_library_uniqueness(libraries)
pp_standards_tests.tests.test_powerpack.rule_pp_models_empty(models)
pp_standards_tests.tests.test_powerpack.rule_pp_name(name)
pp_standards_tests.tests.test_powerpack.rule_pp_name_powerpack_word(name)
pp_standards_tests.tests.test_powerpack.rule_pp_name_special_chars(name)
pp_standards_tests.tests.test_powerpack.rule_pp_publisher(publisher)
pp_standards_tests.tests.test_powerpack.rule_pp_vendors_empty(vendors)
pp_standards_tests.tests.test_powerpack.rule_pp_version_valid(version)
pp_standards_tests.tests.test_powerpack.rule_pp_versions_empty(versions)
pp_standards_tests.tests.test_powerpack.test_get_duplicated_libraries()
pp_standards_tests.tests.test_powerpack.test_powerpack_word_is_not_in_pp_name(powerpack)

Validate that PowerPack in any form does not appear in the name.

Not allowed: PowerPack, powerpack, Power-Pack, Powerpack, Power-pack

For rule see rule_pp_name_powerpack_word(). For unit tests see test_rule_pp_name_powerpack_word().

pp_standards_tests.tests.test_powerpack.test_pp_credential_example(powerpack)

PowerPack includes an example credential marked as Example.

For rule see rule_pp_credential_example(). For unit tests see test_rule_pp_credential_example().

pp_standards_tests.tests.test_powerpack.test_pp_credentials_requiredfields(powerpack)

NOTE: This test has not been implemented yet.

Example credential will have all required fields filled out with instructional text

pp_standards_tests.tests.test_powerpack.test_pp_description(powerpack)

PowerPack description is a fully-formed sentence.

Description must have capitalization and a period, may not be blank.

For rule see rule_pp_description(). For unit tests see test_rule_pp_description().

pp_standards_tests.tests.test_powerpack.test_pp_finalprep_administrative_key(powerpack)

NOTE: This test has not been implemented yet.

administrative key embedded

pp_standards_tests.tests.test_powerpack.test_pp_finalprep_extraneous_objects(powerpack)

NOTE: This test has not been implemented yet.

No extraneous objects appear in the PP (objects from a different PP accidentally included).

pp_standards_tests.tests.test_powerpack.test_pp_finalprep_vendors(powerpack)

NOTE: This test has not been implemented yet.

vendor(s), model(s), and version(s) supported by the PP. If applicable, the vendor(s), model(s), and version(s) that the PowerPack will support.

pp_standards_tests.tests.test_powerpack.test_pp_forceremove(powerpack)

NOTE: This test has not been implemented yet.

Ensure use of force_remove for any object being removed from previous version. Two important notes on force_remove - NOTE: Any time you add a GUID to the force_remove field in the database table (which in turn changes the meta.force_remove file), the PowerPack revision number must be incremented. NOTE 2: Do not edit the meta.force_remove file directly. Instead, edit the column in the master.powerpack database table.If an object, app, etc. was added to a PowerPack in a previous release, simply removing the object is insufficient. To remove the object from existing deployments, use force_remove. Force_remove was specifically coded to address the following content types: dynamic application alerts, dynamic applications, event policies, collection objects, presentation objects, soap objects. Additional examples on the meta.force_remove can be found in: meta_forceremove_notes.txt. To force_remove an object from a PowerPack: Access the master database, navigate to the powerpack table (master.powerpack), and edit the force_remove column.

pp_standards_tests.tests.test_powerpack.test_pp_library_uniqueness(powerpack)

Validate the content library’s uniqueness.

Based on the content library’s names that are part of a powerpack, we can see if the content library is or is not duplicated.

For rules see rule_pp_library_uniqueness() For unit tests see test_rule_pp_library_uniqueness().

pp_standards_tests.tests.test_powerpack.test_pp_models_empty(powerpack)

The models field is not empty.

For rule see rule_pp_models_empty(). For unit tests see test_rule_pp_models_empty().

pp_standards_tests.tests.test_powerpack.test_pp_name(powerpack)

Validate the name of the PowerPack.

Base packs should look like: “Vendor Base Pack”, without a colon.

Non-base packs should look like: “Vendor: Product”.

General naming is as follows: “Vendor: Product Area Vendor: Feature Area.

For rules see rule_pp_base_name() and rule_pp_name(). For unit tests see test_rule_pp_name().

pp_standards_tests.tests.test_powerpack.test_pp_name_has_special_characters(powerpack)

PowerPack name does not include parentheses or special characters. Only colon, underscore, and dash are allowed.

For rule see rule_pp_name_special_chars(). For unit tests see test_rule_pp_name_special_chars().

pp_standards_tests.tests.test_powerpack.test_pp_publisher(powerpack)

Validate the publisher field contains exactly ScienceLogic, Inc..

For rule see rule_pp_publisher(). For unit tests see test_rule_pp_publisher().

Release Notes: horizontal line precedes the copyright and the copyright year is current.

For rule see rule_pp_releasenotes_copyright(). For unit tests see test_rule_pp_releasenotes_copyright().

pp_standards_tests.tests.test_powerpack.test_pp_releasenotes_update(powerpack)

NOTE: This test has not been implemented yet.

Release Notes and Change Log is non-blank and new release is at the top.

pp_standards_tests.tests.test_powerpack.test_pp_releasenotes_updatelist(powerpack)

NOTE: This test has not been implemented yet.

New release section of Release Notes: contains numbered list of updates. The Description of each update in a numbered list. Any additional release notes that correspond to an update.

pp_standards_tests.tests.test_powerpack.test_pp_releasenotes_version(powerpack)

NOTE: This test has not been implemented yet.

New release section of Release Notes: Version number matches version of PP

pp_standards_tests.tests.test_powerpack.test_pp_releasenotes_versionbold(powerpack)

NOTE: This test has not been implemented yet.

New release section of Release Notes: Version number is in bold

pp_standards_tests.tests.test_powerpack.test_pp_technicalnotes_table(powerpack)

NOTE: This test has not been implemented yet.

Technical Notes contains non-blank table mapping PP version to EM7 version

pp_standards_tests.tests.test_powerpack.test_pp_technicalnotes_update(powerpack)

NOTE: This test has not been implemented yet.

New release in Technical Notes is at the top

pp_standards_tests.tests.test_powerpack.test_pp_technicalnotes_version(powerpack)

NOTE: This test has not been implemented yet.

Version number of new release in Technical Notes matches version of PP. This test makes sure that the version number of the PowerPack is the same as what is stated in the technical notes - although we are repurposing that field so this test may be able to be discarded.

pp_standards_tests.tests.test_powerpack.test_pp_vendors_empty(powerpack)

The vendors field is not empty.

For rule see rule_pp_vendors_empty(). For unit tests see test_rule_pp_vendors_empty().

pp_standards_tests.tests.test_powerpack.test_pp_version_alpha(powerpack)

NOTE: This test has not been implemented yet.

Alpha powerpacks initial version number is 0.1 and will not be checked into source control. NOTE: This needs to be reworked because of a change in the content standards.

pp_standards_tests.tests.test_powerpack.test_pp_version_beta1(powerpack)

NOTE: This test has not been implemented yet.

Beta version number is less than one. Remember, a version gte 0.9 or eq. Not production NOTE: This rule is implemented but it should be replaced to match new powerpack format. This involves modifying the check_version function in validate_json_files_by_content.py which currently is hacked together to do this.

pp_standards_tests.tests.test_powerpack.test_pp_version_beta2(powerpack)

NOTE: This test has not been implemented yet.

Initial release for a Beta version number is 0.5.

pp_standards_tests.tests.test_powerpack.test_pp_version_dynamicapp(powerpack)

NOTE: This test has not been implemented yet.

No correlation between PP version and Dynamic App version

pp_standards_tests.tests.test_powerpack.test_pp_version_em7version(powerpack)

NOTE: This test has not been implemented yet.

PowerPack version numbers are independent of EM7 version NOTE: this rule may be obsolete seeing as there was a push to keep certain powerpacks the way they were originally introduced. Perhaps a custom rule such as if em7 version == powerpack version print “error, your versioning is incorrect.”

pp_standards_tests.tests.test_powerpack.test_pp_version_ga(powerpack)

NOTE: This test has not been implemented yet.

Initial Version number is 1.0. NOTE: This check has not been implemented but will be used to test to make sure a GA pack (a pack with no beta or alpha tags) will have the appropriate versioning such as >100, >1.0 (or whatever current standards exist. NOTE: This rule needs to be reworked it is automated under the check_version function which is a hack of the first order. )

pp_standards_tests.tests.test_powerpack.test_pp_version_increment1(powerpack)

NOTE: This test has not been implemented yet.

Increment version number by at least 0.1 from previous version number. Version numbers should be incremented for each major change that is committed to the build. NOTE: Obsolete - Assumes, version number in pp config file is correct.

pp_standards_tests.tests.test_powerpack.test_pp_version_increment2(powerpack)

NOTE: This test has not been implemented yet.

TBD - 1107

pp_standards_tests.tests.test_powerpack.test_pp_version_valid(powerpack)

Validate the PowerPack version.

A valid version is a positive integer (new style), or dotted major.minor.revision string (old style).

For rule see rule_pp_version_valid(). For unit tests see test_rule_pp_version_valid().

pp_standards_tests.tests.test_powerpack.test_pp_versions_empty(powerpack)

The versions field is not empty.

For rule see rule_pp_versions_empty(). For unit tests see test_rule_pp_versions_empty().

pp_standards_tests.tests.test_powerpack.test_rule_pp_credential_example()
pp_standards_tests.tests.test_powerpack.test_rule_pp_description()
pp_standards_tests.tests.test_powerpack.test_rule_pp_library_uniqueness()
pp_standards_tests.tests.test_powerpack.test_rule_pp_models_empty()
pp_standards_tests.tests.test_powerpack.test_rule_pp_name()
pp_standards_tests.tests.test_powerpack.test_rule_pp_name_powerpack_word()
pp_standards_tests.tests.test_powerpack.test_rule_pp_name_special_chars()
pp_standards_tests.tests.test_powerpack.test_rule_pp_publisher()
pp_standards_tests.tests.test_powerpack.test_rule_pp_vendors_empty()
pp_standards_tests.tests.test_powerpack.test_rule_pp_version_valid()
pp_standards_tests.tests.test_powerpack.test_rule_pp_versions_empty()

Dynamic Application Tests

pp_standards_tests.tests.test_dynamic_applications.rule_da_name_purpose(dyn_app_comp_dev, app_type_name, dyn_app_name)
pp_standards_tests.tests.test_dynamic_applications.rule_da_naming_spaces(da_name)
pp_standards_tests.tests.test_dynamic_applications.rule_da_releasenotes_line(da_release_notes)
pp_standards_tests.tests.test_dynamic_applications.rule_da_releasenotes_updatelist(version_updates_html)
pp_standards_tests.tests.test_dynamic_applications.rule_da_releasenotes_version(da_release_notes, da_version)
pp_standards_tests.tests.test_dynamic_applications.rule_da_releasenotes_versionbold(dyn_app_release_notes)
pp_standards_tests.tests.test_dynamic_applications.rule_da_threshold_high(thresholds)
pp_standards_tests.tests.test_dynamic_applications.rule_da_thresholds_required(alerts, thresholds)
pp_standards_tests.tests.test_dynamic_applications.rule_description_da_word_nonabbreviated(dyn_app_description)
pp_standards_tests.tests.test_dynamic_applications.rule_description_dynamic_word_nonabbreviated(dyn_app_description)
pp_standards_tests.tests.test_dynamic_applications.rule_description_nonblank(dyn_app_description)
pp_standards_tests.tests.test_dynamic_applications.rule_is_valid_frequency(app_type_name, poll_frequency)
pp_standards_tests.tests.test_dynamic_applications.rule_is_valid_frequency_change(app_type_name, collection_objects, poll_frequency)
pp_standards_tests.tests.test_dynamic_applications.rule_release_notes_da_word_nonabbreviated(dyn_app_release_notes)
pp_standards_tests.tests.test_dynamic_applications.rule_release_notes_dynamic_word_nonabbreviated(dyn_app_release_notes)
pp_standards_tests.tests.test_dynamic_applications.rule_release_notes_nonblank(dyn_app_release_notes)
pp_standards_tests.tests.test_dynamic_applications.rule_threshold_low_range_zero(thresholds)
pp_standards_tests.tests.test_dynamic_applications.rule_threshold_unit_capitalized(thresholds)
pp_standards_tests.tests.test_dynamic_applications.rule_threshold_unit_nonempty(thresholds)
pp_standards_tests.tests.test_dynamic_applications.test_config_da_poll_freq_change(dynamic_application)

Config apps data collection poll between: 1 to 1440 minutes and at-least one collection object must have change alerting enabled.

Parameters:

dynamic_application (dict) –

parametrized pytest fixture, DA JSON. For rule see rule_is_valid_frequency_change(). For unit tests see test_rule_is_valid_frequency_change().

pp_standards_tests.tests.test_dynamic_applications.test_da_format_in_description(dynamic_application)

Do not abbreviate “Dynamic Application” or use lowercase. Use the full phrase everywhere with both words capitalized. Also checks to make sure that the Dynamic Application description is not empty.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_description_nonblank(),
rule_description_da_word_nonabbreviated()

and rule_description_dynamic_word_nonabbreviated().

For unit tests see test_rule_description_nonblank(),
test_rule_description_da_word_nonabbreviated()

and test_rule_description_dynamic_word_nonabbreviated().

pp_standards_tests.tests.test_dynamic_applications.test_da_format_in_release_notes(dynamic_application)

Do not abbreviate “Dynamic Application” or use lowercase. Use the full phrase everywhere with both words capitalized. Also checks to make sure that the Dynamic Application release notes is not empty.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_release_notes_nonblank(),
rule_release_notes_da_word_nonabbreviated()

and rule_release_notes_dynamic_word_nonabbreviated().

For unit tests see test_rule_release_notes_nonblank(),
test_rule_release_notes_da_word_nonabbreviated()

and test_rule_release_notes_dynamic_word_nonabbreviated().

pp_standards_tests.tests.test_dynamic_applications.test_da_naming_purpose(dynamic_application)

Each “Dynamic Application” is appended with one of several valid tags indicating purpose: Discovery, Configuration, Performance, Count (are there more?). This rule is checked with da_naming_vendor.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rule see rule_da_name_purpose().

For unit tests see test_rule_da_name_purpose().

pp_standards_tests.tests.test_dynamic_applications.test_da_naming_spaces(dynamic_application)

Dynamic Application can not have multiple spaces in the name.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_da_naming_spaces()

For unit tests see test_rule_da_naming_spaces()

pp_standards_tests.tests.test_dynamic_applications.test_da_poll_frequency(dynamic_application)

Performance Data collection: 5 to 15 minutes. Config apps poll between 1 and 1440 mins

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rule see rule_is_valid_frequency().

For unit tests see test_rule_is_valid_frequency().

pp_standards_tests.tests.test_dynamic_applications.test_da_pollfrequency_journal(dynamic_application)

NOTE: This test has not been implemented yet.

Journal applications have no guidelines on polling frequency

Validates Dynamic Application release notes contain a valid copyright. Release Notes: copyright section is at the bottom and contains an updated copy of company standard copyright.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_da_release_notes_has_copyright_info().

For unit tests see test_rule_da_release_notes_has_copyright_info().

pp_standards_tests.tests.test_dynamic_applications.test_da_releasenotes_line(dynamic_application)

Release Notes: horizontal line preceeds the copyright

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_da_releasenotes_line()

For unit tests see test_rule_da_releasenotes_line()

pp_standards_tests.tests.test_dynamic_applications.test_da_releasenotes_topupdate(dynamic_application)

NOTE: This test has not been implemented yet.

Release Notes and Change Log: new release is at the top

pp_standards_tests.tests.test_dynamic_applications.test_da_releasenotes_updatelist(dynamic_application)

Validate that the release notes contain an update list in Numbered-List format.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_da_releasenotes_updatelist()

For unit tests see test_rule_da_releasenotes_updatelist()

pp_standards_tests.tests.test_dynamic_applications.test_da_releasenotes_version(dynamic_application)

Validates that the latest version in the release notes matches the version of Dynamic Application.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rule see rule_da_releasenotes_version().

For unit tests see test_rule_da_releasenotes_version().

pp_standards_tests.tests.test_dynamic_applications.test_da_releasenotes_versionbold(dynamic_application)

Validates that each release section of the Release Notes contains a version number that is bold

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_da_releasenotes_versionbold()

For unit tests see test_rule_da_releasenotes_versionbold()

pp_standards_tests.tests.test_dynamic_applications.test_da_snippets_logfile(dynamic_application)

NOTE: This test has not been implemented yet.

do not write any log information to /data/tmp

pp_standards_tests.tests.test_dynamic_applications.test_da_threshold_high(dynamic_application)

Validates that a threshold high is numerically 100 when threshold is a percentage

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rule see rule_da_threshold_high().

For unit tests see test_rule_da_threshold_high().

pp_standards_tests.tests.test_dynamic_applications.test_da_threshold_low(dynamic_application)

Validates that a threshold low is numerically 0 when threshold is a percentage

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_threshold_low_range_zero()

For unit tests see test_rule_threshold_low_range_zero()

pp_standards_tests.tests.test_dynamic_applications.test_da_thresholds_name_format(dynamic_application)

NOTE: This test has not been implemented yet.

thresholds name format is “<entity><metric><level>”

pp_standards_tests.tests.test_dynamic_applications.test_da_thresholds_required(dynamic_application)

Verify that if an alert formula exists which includes a threshold, that a threshold object also exists.

Create a threshold whenever a value in an alert is checking against a hard-coded value.

pp_standards_tests.tests.test_dynamic_applications.test_da_thresholds_thresholds_units_format(dynamic_application)

Threshold unit is not empty. If the threshold is not a percentage and each word is capitalized or special.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rules see rule_threshold_unit_nonempty()

and rule_threshold_unit_capitalized().

For unit tests see test_rule_threshold_unit_nonempty()

and test_rule_threshold_unit_capitalized().

pp_standards_tests.tests.test_dynamic_applications.test_da_version_beta_increment(dynamic_application)

NOTE: This test has not been implemented yet.

Beta dynamic apps will increment by 0.1 for each new release. NOTE: PowerPack versioning content standards have changed.

pp_standards_tests.tests.test_dynamic_applications.test_da_version_beta_initial(dynamic_application)

NOTE: This test has not been implemented yet.

Initial versions of Beta dynamic app will have version of 0.5, regardless of when they are inroduced and GA powerpacks will take on the values of 1.0 or later. This is an encapsulating rule. This rule relies on check_version which is a function in validate_json_files_by_content.py

pp_standards_tests.tests.test_dynamic_applications.test_da_version_ga_increment(dynamic_application)

NOTE: This test has not been implemented yet.

GA dynamic apps will increment version by 0.1 for each new release. NOTE: PowerPack versioning content standards have changed.

pp_standards_tests.tests.test_dynamic_applications.test_da_version_ga_initial(dynamic_application)

NOTE: This test has not been implemented yet.

initial GA dynamic app will have version of 1.0

pp_standards_tests.tests.test_dynamic_applications.test_rule_da_name_purpose()
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_naming_spaces()
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_releasenotes_line(expected, da_releasenotes_line)
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_releasenotes_updatelist(expected, release_notes)
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_releasenotes_version(release_notes, da_version, result)
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_releasenotes_versionbold(result, release_notes)
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_threshold_high()
pp_standards_tests.tests.test_dynamic_applications.test_rule_da_thresholds_required(alerts, thresholds, result)
pp_standards_tests.tests.test_dynamic_applications.test_rule_description_da_word_nonabbreviated()
pp_standards_tests.tests.test_dynamic_applications.test_rule_description_dynamic_word_nonabbreviated()
pp_standards_tests.tests.test_dynamic_applications.test_rule_description_nonblank()
pp_standards_tests.tests.test_dynamic_applications.test_rule_is_valid_frequency()
pp_standards_tests.tests.test_dynamic_applications.test_rule_is_valid_frequency_change()
pp_standards_tests.tests.test_dynamic_applications.test_rule_release_notes_da_word_nonabbreviated()
pp_standards_tests.tests.test_dynamic_applications.test_rule_release_notes_dynamic_word_nonabbreviated()
pp_standards_tests.tests.test_dynamic_applications.test_rule_release_notes_nonblank()
pp_standards_tests.tests.test_dynamic_applications.test_rule_threshold_low_range_zero()
pp_standards_tests.tests.test_dynamic_applications.test_rule_threshold_unit_capitalized()
pp_standards_tests.tests.test_dynamic_applications.test_rule_threshold_unit_nonempty()

Collection Object Tests

pp_standards_tests.tests.test_pack_collection_objects.rule_has_bad_coll_obj(dynamic_application)
pp_standards_tests.tests.test_pack_collection_objects.test_empty_cobj_descriptions(dynamic_application)

Test for empty collection object descriptions. The validation is not taking into account collection objects that have the class-type as Label or Discovery.

Parameters:

dynamic_application (dict) – parametrized pytest fixture, DA JSON.

For rule see rule_has_bad_coll_obj().

For unit tests see test_rule_has_bad_coll_obj().

pp_standards_tests.tests.test_pack_collection_objects.test_rule_has_bad_coll_obj()

Presentation Object Tests

pp_standards_tests.tests.test_pack_presentation_objects.rule_data_unit_allow(data_unit)
pp_standards_tests.tests.test_pack_presentation_objects.rule_data_unit_capitalized(data_unit)
pp_standards_tests.tests.test_pack_presentation_objects.rule_data_unit_empty(data_unit)
pp_standards_tests.tests.test_pack_presentation_objects.rule_guide_text_empty(guide_text)
pp_standards_tests.tests.test_pack_presentation_objects.rule_suffix_valid(data_unit, suffix_value)
pp_standards_tests.tests.test_pack_presentation_objects.rule_summarization_state_enabled(state)
pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_data_units(dynamic_application, presentation_object)

Presentation object unit is correct based on units.json file. Set the data unit as a readable string.

Parameters:
  • dynamic_application (dict) – parametrized pytest fixture, DA JSON.

  • presentation_object (dict) – parametrized pytest fixture, PresObj JSON.

For rules see rule_data_unit_empty() and rule_data_unit_allow().

For unit tests see test_rule_data_unit_empty() and test_rule_data_unit_allow().

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_data_units_format(dynamic_application, presentation_object)

Presentation object unit’s each word is capitalized or unit is empty

Parameters:
  • dynamic_application (dict) – parametrized pytest fixture, DA JSON.

  • presentation_object (dict) – parametrized pytest fixture, PresObj JSON.

For rules see rule_data_unit_capitalized().

For unit tests see test_rule_data_unit_capitalized().

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_dataunit_seconds(dynamic_application, presentation_object)

NOTE: This test has not been implemented yet.

Data unit abbreviation for seconds should be “s”. (This rule enables autoscaling.)

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_formula_range(dynamic_application, presentation_object)

NOTE: This test has not been implemented yet.

formulas: range checks where applicable

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_formula_rounding(dynamic_application, presentation_object)

NOTE: This test has not been implemented yet.

perform rounding in presentation object where applicable. If any rounding needs to be done, it is done in the presentation object formula, rather than in the request/snippet. This ensures that the raw value is stored in the database.

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_iops(dynamic_application, presentation_object)

NOTE: This test has not been implemented yet.

Add support for the Storage standards for the operations per second metrics. The Data Unit should be IOs/Second and Abbreviation/Suffix should be set to IOPS based on the Storage (EMC, Netapp) industry standard.

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_name(dynamic_application, presentation_object)

NOTE: This test has not been implemented yet.

set the name so that it concisely describes the presentation

pp_standards_tests.tests.test_pack_presentation_objects.test_da_po_suffix(dynamic_application, presentation_object)

Use an industry standard abbreviation for the Abbreviation/Suffix fields when available.

Parameters:
  • dynamic_application (dict) – parametrized pytest fixture, DA JSON.

  • presentation_object (dict) – parametrized pytest fixture, PresObj JSON.

For rules see rule_suffix_valid().

For unit tests see test_rule_suffix_valid().

pp_standards_tests.tests.test_pack_presentation_objects.test_empty_guide_text_presentation_objects(dynamic_application, presentation_object)

Test for empty presentation object guide text.

Parameters:
  • dynamic_application (dict) – parametrized pytest fixture, DA JSON.

  • presentation_object (dict) – parametrized pytest fixture, PresObj JSON.

For rules see rule_guide_text_empty().

For unit tests see test_rule_guide_text_empty().

pp_standards_tests.tests.test_pack_presentation_objects.test_rule_data_unit_allow()
pp_standards_tests.tests.test_pack_presentation_objects.test_rule_data_unit_capitalized()
pp_standards_tests.tests.test_pack_presentation_objects.test_rule_data_unit_empty()
pp_standards_tests.tests.test_pack_presentation_objects.test_rule_guide_text_empty()
pp_standards_tests.tests.test_pack_presentation_objects.test_rule_suffix_valid()
pp_standards_tests.tests.test_pack_presentation_objects.test_rule_summarization_state_enable()
pp_standards_tests.tests.test_pack_presentation_objects.test_summarization_state_enabled(dynamic_application, presentation_object)

Add validation to ensure that Presentation Objects have enabled the Summarization State (i.e. has set “state” to 1)

Parameters:
  • dynamic_application (dict) – parametrized pytest fixture, DA JSON.

  • dynamic_application – a dictionary that represents a Dynamic App converted from the PowerPack JSON.

For rules see rule_summarization_state_enable().

For unit tests see test_rule_summarization_state_enable().

Alert Tests

pp_standards_tests.tests.test_alerts.rule_da_alert_has_event(alert)
pp_standards_tests.tests.test_alerts.rule_da_alerts_zero(formula)
pp_standards_tests.tests.test_alerts.test_da_alert_event(dynamic_application, alert)

All alerts have a corresponding event

pp_standards_tests.tests.test_alerts.test_da_alerts_alertformat(dynamic_application)

NOTE: This test has not been implemented yet.

Internal Alert messages should follow this template: ‘Application_name [App_ID]: Alert messages’

pp_standards_tests.tests.test_alerts.test_da_alerts_clear_alert(dynamic_application)

NOTE: This test has not been implemented yet.

“return to normal” formula should include “and active(<error_threshold_id>)” for each policy that triggered the non-normal condition

pp_standards_tests.tests.test_alerts.test_da_alerts_greaterthan(dynamic_application)

NOTE: This test has not been implemented yet.

use “>” when exceeding a threshold

pp_standards_tests.tests.test_alerts.test_da_alerts_greaterthanorequal(dynamic_application)

NOTE: This test has not been implemented yet.

use “>=” when returning from a low threshold

pp_standards_tests.tests.test_alerts.test_da_alerts_lessthan(dynamic_application)

NOTE: This test has not been implemented yet.

use “<” when falling through a lower-bound threshold

pp_standards_tests.tests.test_alerts.test_da_alerts_lessthanorequal(dynamic_application)

NOTE: This test has not been implemented yet.

use “<=” when returning to normal from high threshold

pp_standards_tests.tests.test_alerts.test_da_alerts_logmessage(dynamic_application)

NOTE: This test has not been implemented yet.

include “%L” in the Log Message if data is non-scalar

pp_standards_tests.tests.test_alerts.test_da_alerts_logmessage_parentheses(dynamic_application)

NOTE: This test has not been implemented yet.

if “%L” occurs in the Log Message it must be wrapped in parentheses

pp_standards_tests.tests.test_alerts.test_da_alerts_maintain_state(dynamic_application)

NOTE: This test has not been implemented yet.

set ‘maintain state’ to Yes, when exceeding a threshold

pp_standards_tests.tests.test_alerts.test_da_alerts_round(dynamic_application)

NOTE: This test has not been implemented yet.

if collection object is a float, alert must round to two decimal places

pp_standards_tests.tests.test_alerts.test_da_alerts_units(dynamic_application)

NOTE: This test has not been implemented yet.

“%T” and “%V” in alerts must be followed by units that match the threshold and presentation object units

pp_standards_tests.tests.test_alerts.test_da_alerts_vendor(dynamic_application)

NOTE: This test has not been implemented yet.

include vendor name in Alert policy, if any

pp_standards_tests.tests.test_alerts.test_da_alerts_zero(dynamic_application)

This rule checks that an alert formula does not divide by 0. If a formula has a division, ensure that it will not divide by zero by examples such as: * o_id != 0 … * result(0 if o_id==0 else …)

A group decision was made to utilize regex over eval to evaluate the formula and check for guards against division by zero.

pp_standards_tests.tests.test_alerts.test_rule_da_alerts_zero()
pp_standards_tests.tests.test_alerts.test_rule_dat_alert_has_event()

Device Category Tests

pp_standards_tests.tests.test_device_categories.test_device_categories_singular(device_category)

NOTE: This test has not been implemented yet.

Device categories must use the singular form of words.

pp_standards_tests.tests.test_device_categories.test_device_categories_system_group(device_category)

NOTE: This test has not been implemented yet.

System group of categories is reserved for ScienceLogic products

pp_standards_tests.tests.test_device_categories.test_device_categories_valid_values(device_category)

NOTE: This test has not been implemented yet.

If you need to add a device class, pick the device category that best matches your device class from the approved list below. A device class must be in one of these device categories.

pp_standards_tests.tests.test_device_categories.test_device_categories_vendor_names(device_category)

NOTE: This test has not been implemented yet.

Device categories must not include vendor names.

Event Policy Tests

pp_standards_tests.tests.test_event_policies.rule_event_advanced_expiry_delays(eseverity, expiry_time)
pp_standards_tests.tests.test_event_policies.rule_event_policies_severity(eseverity)
pp_standards_tests.tests.test_event_policies.rule_event_policies_state(state)
pp_standards_tests.tests.test_event_policies.test_event_advanced_expiry_delays(event_policy)

Checks if the expiry delays conforms with the standards.

expiry delays: healthy=15 (minutes), notice=30, minor=60, major=90, critical=90

eseverity: ‘0’=healthy, ‘1’=notice, ‘2’=minor, ‘3’=major, ‘4’=critical

pp_standards_tests.tests.test_event_policies.test_event_policies_description(event_policy)

NOTE: This test has not been implemented yet.

policy Description must contain these headers in order and in bold: Description, Probable Cause, Resolution

pp_standards_tests.tests.test_event_policies.test_event_policies_format(event_policy)

NOTE: This test has not been implemented yet.

Event policy format: “<Vendor>:<Application/Component><Version><has exceeded threshold | returned to Normal | fell below the threshold>”

pp_standards_tests.tests.test_event_policies.test_event_policies_severity(event_policy)

Checks if the severity conforms with the standards.

Event severity must be one of these: Healthy(0), Notice(1), Minor(2), Major(3), Critical(4)

pp_standards_tests.tests.test_event_policies.test_event_policies_state(event_policy)

Checks if event policy state is enabled.

operational state=’1’ (enabled)

pp_standards_tests.tests.test_event_policies.test_event_policies_substitute(event_policy)

NOTE: This test has not been implemented yet.

event message is “%M” when the value of the string gets set elsewhere

pp_standards_tests.tests.test_event_policies.test_event_policies_vendor_terminology(event_policy)

NOTE: This test has not been implemented yet.

use vendor terminology for all policy Description fields

pp_standards_tests.tests.test_event_policies.test_rule_event_advanced_expiry_delays()
pp_standards_tests.tests.test_event_policies.test_rule_event_policies_severity()
pp_standards_tests.tests.test_event_policies.test_rule_event_policies_state()