DX NetOps

Expand all | Collapse all

Global Collection which Devices that belong to Certain Containers

  • 1.  Global Collection which Devices that belong to Certain Containers

    Posted Nov 06, 2012 06:34 PM
    Hello,

    I would like to create a Global Collection with all devices that belongs to Network Containers that match a certain criteria. For example:
    - All devices that belong to Network containers with names starting with XYZ
    - All devices that belong to Network containers that has an attribute xpto = 1

    Is there anyway to accomplish that? My intention is to use it to apply policies based on the type of the Network that the device belong to. I don't mind use legacy xml policies if that works.


  • 2.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 06, 2012 06:52 PM
    Can't think of a way to do a "Contained by" search except to use an attribute that is inheritted from the network container. TopologyModelNameString and Security String are two that come to mind.

    Would be interesting to see it done via a policy.


  • 3.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 06, 2012 06:59 PM
    Yes, TopologyModelNameString would be the solution if my search was based on the name of the Network Container. But my intention is actually create a custom attribute for the Network Model Type to hold the classification of my site. The idea is to configure policies for devices based on the classification of the site it belongs to.


  • 4.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 07, 2012 03:51 AM
    Use Global Collections, this way you don't have to add a new attribute for a number of model types. CollectionsModelNameString
    0x12adb
    Text String is the attribute that you could use to accomplish this.

    Create dynamic global collections that will be used in Policy Manager as source for the searches.

    In the searches for the dynamic GC you can refer to CollectionsModelNameString attribute.


  • 5.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 07, 2012 09:54 AM
    Thank you for the sugestion, but I'd like to make things simpler for the operators. The Idea is to classifiy the sites (I'm using Network Containers to represent the sites) in order of importance (High, Medium, Low). This way if I change the classification of a site my global collections/searches/policies will have the listof affected devices reflected accordingly. It is simple to create a dynamic GC containing all Sites of a certain classification. But those GC cannot be used in policies because I need the devices to be on the top level of the GC.


  • 6.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 07, 2012 10:08 AM
    Use the security strings much?


  • 7.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 07, 2012 10:45 AM

    renato.orgito wrote:

    Thank you for the sugestion, but I'd like to make things simpler for the operators. The Idea is to classifiy the sites (I'm using Network Containers to represent the sites) in order of importance (High, Medium, Low). This way if I change the classification of a site my global collections/searches/policies will have the listof affected devices reflected accordingly. It is simple to create a dynamic GC containing all Sites of a certain classification. But those GC cannot be used in policies because I need the devices to be on the top level of the GC.
    What do you mean by 'But those GC cannot be used in policies because I need the devices to be on the top level of the GC.' ?

    In Universe, if you use containers, one device can only reside in one container. Of-course, if you're trying to establish a simple grouping, based on the importance of the device, you may also consider using 'Criticality (0x1290c)' attribute to set it according to your needs.

    Create 3 Global Collections, 3 searches, 3 policy manger filters. You add the device to corresponding GC either by search automatically or manually.

    If you add the device manually to the High GC for example, you set a policy to change the attribute Criticality to desired value.

    I think GC is easier than Containers. With containers you have other problems with the Security string.


  • 8.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 07, 2012 11:02 AM
    Thank you again for the sugestion,

    I still curious about if it is possible to create a search/GC to list all devices of certain Containers (For example containers with an attribute set to a specific value).


  • 9.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 18, 2012 10:21 AM

    renato.orgito wrote:

    Thank you again for the sugestion,

    I still curious about if it is possible to create a search/GC to list all devices of certain Containers (For example containers with an attribute set to a specific value).
    It's possible, but not worth the complexity to implement (correlating models from multiple script web api calls into a GC).

    You should instead create multiple GCs instead of a LAN attribute and name these GCs as your attribute.
    Then you create Aggregate GCs that dynamically search for all models of your "attribute GCs".
    When you want to add/remove your LAN container attribute to a model, you add the model to the "attribute GC" instead.

    Nobody actually sees the "attribute GCs", just the Aggregate GCs.


  • 10.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 20, 2012 12:48 AM

    renato.orgito wrote:

    Thank you again for the sugestion,

    I still curious about if it is possible to create a search/GC to list all devices of certain Containers (For example containers with an attribute set to a specific value).
    The answer is Yes and No.

    Yes you can create a GC that displays devices that are in a container which has a certain attribute. The GC will also have the parent container as well. EG.

    GCabc (Global collection)
    Network Container
    device a
    device b

    To do thiis select "Special Criteria" = None

    Haven't tried create a policy against it but guessing the policy will only apply to the Network Container not the devices below that.

    If you set the "Special Criteria" = Devices Only you will get nothing in the GC.

    Even with legacy Policy XMLs not going to be any easier. I only use the legacy policy method


  • 11.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 20, 2012 08:00 AM
    Thank you Andrew,

    But only the containers will be members of the GC. Thus the policies would not be applied to the devices under the container.


  • 12.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 20, 2012 06:23 PM
    I would be interested to know what you are trying to achive. That is WHAT not HOW.

    I am sure there are many people here that might have an alternative way of achieving your final result in a much simpler way.

    From reading through your posts this is what I have worked out so far but probably way off track :grin:

    1 You want to group all the devices for a each site under a parent container to make it easier for operators in each site to locate their devices
    2 You want to apply a different policy to each site (not sure if you wanted to apply different policies within a site)

    How close am I?

    3 Maybe you also want to define permissions for a site.


  • 13.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 21, 2012 07:33 AM

    Andrew1 wrote:

    I would be interested to know what you are trying to achive. That is WHAT not HOW.

    I am sure there are many people here that might have an alternative way of achieving your final result in a much simpler way.

    From reading through your posts this is what I have worked out so far but probably way off track :grin:

    1 You want to group all the devices for a each site under a parent container to make it easier for operators in each site to locate their devices
    2 You want to apply a different policy to each site (not sure if you wanted to apply different policies within a site)

    How close am I?

    3 Maybe you also want to define permissions for a site.

    Andrew1 wrote:

    I would be interested to know what you are trying to achive. That is WHAT not HOW.

    I am sure there are many people here that might have an alternative way of achieving your final result in a much simpler way.

    From reading through your posts this is what I have worked out so far but probably way off track :grin:

    1 You want to group all the devices for a each site under a parent container to make it easier for operators in each site to locate their devices
    2 You want to apply a different policy to each site (not sure if you wanted to apply different policies within a site)

    How close am I?

    3 Maybe you also want to define permissions for a site.
    Hi Andrew,

    I have about 300 sites (offices, industrial plants, etc) represented by Network Containers in Spectrum. My sites are classified in different categories that have differente impacts to the business. Let's say they are classified as High, Medium and Low. I have a custom attribute in the Network Model and have customized oneclick display/set this attribute in my lab environment.

    What I want is to create a GC/search with all devices contained in all sites classified as High for example. I found the solution to that based on another post:

    99063895

    The custom search below returns all devices belonging to all Network containers classified as Medium:
    <search-criteria>
    <devices-only-search />
    <child-models>
    
    <filtered-models>
    
    <equals>
    
      <attribute id="0xffff0002">
    
    
    <value>2</value>
    
      </attribute>
    
    </equals>
    
    </filtered-models>
    
    <relation>0x10002</relation>
    </child-models>
    </search-criteria>
    Unfortunately documentation for those more advanced custom searches are incredible hard to find. What I'd ike to do now is to further refine the search above to only return certain model types. I've tried many ways but was not able to figure it out. The lack of documentation of, more likely, my inability to find the proper documentation is the problem.


  • 14.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 22, 2012 04:50 PM
    Nice find on the Tech Tip. What a small world. The person posting that tech tip is one the used to handle most of my support requests. Have added him as a friend and if he accepts I will try and steer him to this thread.

    Meant to be working on IM 2.0 setup but if I get some time I'll have a bit more of an experiment on our dev environment. I miss doing Spectrum stuff:grin:


  • 15.  RE: Global Collection which Devices that belong to Certain Containers
    Best Answer

    Posted Nov 22, 2012 06:54 PM
    After your link to the Tech Tip it turned out easier than I thought. Just embed one search inside another:

    Inner search similar to yours. I don't have a spcial attribute like you so I just used the model name. It returns all device models inside the network container with the name nsw_servers. This is what is refered to as "Andrews Test" is the outer search.
    <search-criteria>
    <devices-only-search />
    <child-models>
      <filtered-models>
        <and>
          <has-prefix-ignore-case>
            <model-name>nsw_server</model-name>
          </has-prefix-ignore-case>
        </and>
      </filtered-models>
      <relation>0x10002</relation>
    </child-models>  
    </search-criteria>
    Outer search: I then created an outer search using the one click console that "anded" modetype = expression and use exisitng button (select my first search). The final result is I get all devices of mdel type UPSAPC that are in the network container nsw_servers.
    <search-criteria>
      <devices-only-search />
      <filtered-models>
        <and>
          <equals-ignore-case>
            <attribute id="0x10000">
              <value>UpsApc92xx</value>
            </attribute>
          </equals-ignore-case>
          <search-criteria display-name="Devices: Andrews Test">
            <devices-only-search />
            <child-models>
              <filtered-models>
                <and>
                  <has-prefix-ignore-case>
                    <model-name>nsw_server</model-name>
                  </has-prefix-ignore-case>
                </and>
              </filtered-models>
              <relation>0x10002</relation>
            </child-models>
          </search-criteria>
        </and>
      </filtered-models>
    </search-criteria>
    You could just do the seond search as a GC. Then apply policy to that.


  • 16.  RE: Global Collection which Devices that belong to Certain Containers

    Posted Nov 23, 2012 05:13 AM
    Thank you Andrew,

    That completely solved the problem. It turned out to be a simple solution after all. The complicated part is to find out how to do it. I wish this where documented somewhere :)

    After adpating your solution to my needs, here is how my search looks like:
    <search-criteria>
      <devices-only-search />
      <filtered-models>
        <and>
          <equals>
            <attribute id="0xffff0000">
              <value>3</value>
            </attribute>
          </equals>
          <search-criteria>
            <devices-only-search />
            <child-models>
              <filtered-models>
                <equals>
                  <attribute id="0xffff0002">
                    <value>2</value>
                  </attribute>
                </equals>
              </filtered-models>
              <relation>0x10002</relation>
            </child-models>
          </search-criteria>      
        </and>
      </filtered-models>
    </search-criteria>