Loading a discovery scope from a file

You can use the loadscope command to manage and load the discovery scope from a file.

Important: Creating large scopes can lead to performance issues, including a server crash.
The following example shows the format of the loadscope command:
loadscope.jy [-d] [-q] [-C] -u username -p password  clearAll | (clearScopename)  | (clearScopeSetname) | ([-s ScopeSetName | -g ScopeGroupName] load [scopefile])
The loadscope.jy script is in the $COLLATION_HOME/bin directory.
The following list describes the loadscope command options:
-d
Turns on verbose debug logging.
-q
Loads the scope without synchronization.

You can use this option when you load multiple scopes. Ensure that you do not use the -q flag with the final one so that synchronization can then take place.

Fix Pack
3Important: In TADDM 7.3.0.3, and later, this option is ignored. As the performance of scope synchronization improved significantly, this option is no longer needed.
-C
This parameter makes the loadscope.jy file delete the scope. However, it does not delete the ScopeElements assigned to the scope that is later removed by a Topology Builder agent.
-u username
The user name to access the TADDM server. This parameter is mandatory for load operations.
-p password
The password for the user name. This parameter is mandatory for load operations.
clearAll
Deletes all scope sets and scope group.
clearScope
Deletes scope set or scope group.
clearScopeSet
Important: Deprecated.
Deletes scope set or scope group.
-s ScopeSet or -g ScopeGroup
ScopeSet is the scope set name used for loading the scope elements. ScopeGroup is the scope group name used for loading the scope sets. This parameter is mandatory for load operations.
Important: The scope set names cannot contain the following characters:
  • '
  • .
  • /
load
Loads the scope elements to the system, replacing existing elements with new elements.
scopefile
The file that contains the following elements:
  • The scope elements in case you want to load a scope set by using -s ScopeSet parameter.
  • The scope sets in case you want to load a scope group by using -g ScopeGroup parameter.
This parameter is mandatory for load operations.
Loading a scope set from file
The following example shows how to load a discovery file by using the loadscope command:
% loadscope.jy -u administrator -p cmdb -s Windows load /tmp/scopefile
A scope file consists of entries in the following format:
scope, [exclude_scope:exclude_scope...],[description]
A scope file can contain any number of scopes, by using any combination of the following scope types:
  • Subnet scopes (for example, 1.2.3.4/255.255.255.0)
  • Address scopes (for example, 1.2.3.4)
  • Range scopes (for example, 1.2.3.4-5.6.7.8)
Important: The following are details about the scope file format:
  • Only IP addresses are valid in the scope file. Host names cannot be used.
  • Each scope element exists on a separate line.
  • Address scopes must not include exclusions.
  • The ampersand character (&) is not allowed in the [description] parameter.
  • Entries are ignored if they are not valid.
  • You can insert comment lines prefixed with the number sign (#).
The following sample text is a sample scope file:
# This is a comment
10.10.10.10,,
10.10.10.20,,
10.10.10.30,,
10.10.10.0/255.255.255.0,10.10.10.2:10.10.10.3,
10.10.10.2-10.10.10.9,10.10.10.4:10.10.10.5,
10.10.10.88,,
10.10.10.999,,
Loading a scope group from file
A scope file consists of entries in the following format, which describes a single scope group:
scopeSetName1
scopeSetName2
...
scopeSetNameN
where scopeSetNameN is the name of an existing scope set that is to be added into the group.
Important: Each scope set name is placed on a separate line. You can insert comment lines with the number sign (#) at the beginning.
Use the following commands to load and delete scope sets and scope groups:
  • Loading a scope set:
     loadscope.jy -u <username> -p <password> -s <ScopeSet> load <scopefile>
  • Loading a scope group:
    loadscope.jy -u <username> -p <password> -g <ScopeGroup> load <scopefile>
  • Deleting a scope set or a scope group:
     loadscope.jy -u <username> -p <password> clearScope <name>
  • Deleting all scope sets and scope groups:
    loadscope.jy -u <username> -p <password> clearAll