Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

File : lib/pbs_testlib.py

Class : ServerNew API : 

Interface-1:import_hook_config

import_hook_config(self, hook_name, bodyhook_conf, hook_type, level=logging.INFO)

...

                  body: The body of the hook as a string.

                  body  hook_conf: strbody

                  hook_type: Type of the hook ("hook" or "pbshook")

...

                  raises: PbsManagerError

This method is used to import hook config file.

hook_body = """

{

cpus : {

           enabled: True

           }

}""

Example : self.import_hook_config("pbs_cgroups", hook_body, "hook")

Interface-2: export_hook_config

 export_hook_config(self, hook_name, hook_type)  

...

                  raises: PbsManagerError

import_hook_config: 

This method is used to import hook config file.

hook_body = """

{

cpus : {

           enabled: True

           }

}""

Ex : self.import_hook_config("pbs_cgroups", hook_body, "hook")

export_hook_config:

This method is used to export hook config file.

ExExample: out = self.export_hook_config("pbs_cgroups", "hook")

...