DX NetOps

  • 1.  Spectrum OneClick customizations

    Posted Jun 21, 2012 08:13 PM
    Spectrum 9.2.1 hf06 on Linux Dist env

    Hi
    I'm moderately familiar with Oneclick customizations - know how to do menu items, context menu items, create new table entries, attrbiutes against models etc etc

    What I've not done is start from a new model type and build a special oneclick "module" around that

    To explain - I am creating a network record system using Spectrum as the DB and front end.
    Some of the components are standard Spectrum polled models - devices and ports
    but others are non discoverable non pollable items that I need to manually add
    I've created new model types for
    NRS_Cloud_Base based on Provider_Cloud (added a number of new attributes to this for recording relevant information)
    NRS_Backhaul_Provider (based on model type NRS_Cloud_Base)
    NRS_Cable Provider (also based on NRS_Cloud_Base)
    NRS_Support based on SM_Customer
    And built 2 new relationships
    NRS_Connected which allows ports to connect to clouds (as above) and clouds to connect to clouds (wanted to use a unique relationship for modelling and reporting purposes)
    NRS_Supported_by which connects an NRS Support model to the NRS Cloud model

    All good so far
    The models build, the attributes are there and I can build a basic circuit GC with the correct models and using CLI create the relationships
    Issue is how to present in OneClick
    I can see the various cloud models in OneClick -
    issue 1 is I need to customise the icon and build up the correct information tab contents (think the info tab will be easy, customisation of icon seems to be tricky)
    issue 2 I would like to be able to create a GC model for the circuit that each of these models will be part of (so a couple of ports, some backhaul clouds and a couple of NRS_Support models) and be able to show the relationship between the models grpahically, maybe even model them. So in a similar way that we can see the connection between devices I would like to be able to click / connect from to using my NRS_Connected relationship in oneclick

    Eventualy I would ilke to create a seperate sub menu in Navigation (to help seperate things out a bit ) but thats running before I can walk

    I've read the Oneclick customisation manual and not finding it that easy to follow
    What I am looking for is a very good demo / example of the relevant files needed to create new model types in onclick and if anyone has tips on how I can achieve the other bits - showing the relationships visually
    That would be much appreciated.
    I find once I get a grip on the basics I can get things sorted, just a case of making that initial break through


  • 2.  RE: Spectrum OneClick customizations

    Broadcom Employee
    Posted Jun 21, 2012 09:09 PM
    Moving to the Spectrum General Discussion Board


  • 3.  RE: Spectrum OneClick customizations

    Posted Jun 21, 2012 09:12 PM

    wolwi01 wrote:

    Moving to the Spectrum General Discussion Board
    My apologies - thought I was in the correct location - obviously had done one clieck too many to get into the wrong forum


  • 4.  RE: Spectrum OneClick customizations

    Broadcom Employee
    Posted Jun 21, 2012 09:18 PM
    No worries Jason. I'm just trying to ensure this gets answered as quickly as possible for you.


  • 5.  RE: Spectrum OneClick customizations

    Posted Jun 21, 2012 09:29 PM
    Ok Issue 1 is now dealt with

    So main thing is the presentation layer and ability to use oneclick to link items together


  • 6.  RE: Spectrum OneClick customizations

    Posted Jun 25, 2012 02:27 AM
    Hello,

    it's not so complicated to build own icons etc.
    issue 1 is I need to customise the icon and build up the correct information tab contents (think the info tab will be easy, customisation of icon seems to be tricky)
    The statrting point for all modeltype-based customizations are the "$specroot/tomcat/webapps/spectrum/WEB-INF/web.xml" or the "$specroot/custom/console/config/custom-app-config.xml" file. If the "custom-app-config.xml" file is not located in the custom directory, copy it from "$specroot/tomcat/webapps/spectrum/WEB-INF/console/config/".
    The you define the behavior of the modeltypes in one of that two files. Example for one entry in the custom-app-config.xml (copied from the topo-app-config):

    <contents-registry>
    <icon-reg-id>node-icon-config</icon-reg-id>
    <tooltip-config>device-tooltip-config</tooltip-config>
    <information-config>view-iagent-config</information-config>
    <performance-config>performance-rfc2790app-config</performance-config>
    <model-type>0x4a40000</model-type> <!-- IAgent -->
    </contents-registry>

    The "icon-reg-id" file contains the definition of the icon, which is displayed in the oneClick client.
    The "tooltip-config file contains the definition of the tooltip, which is displayed if you move the mouse over a icon in e.g. the topology view.
    The "information-config" file contains the definition of the Information Tab in OneClick (Submenus etc.)
    The "performance-config" file contains the definition of the performance tab in OneClick.
    The "model-type" has to be used, if you want define all the definitions in the "contents-registry" section for one or more model types.

    This is the stating point. For icons there is a good chapter in the "OneClick Customization Guide" on page 67 and later. You can use the build-in definitions in the "$specroot/tomcat/webapps/spectrum/WEB-INF" directory. The stating point here is the "topo/config/topo-app-config" file.
    For creating the icons, you can use the out-of-the-box icons, which are shipped in the jar file "$specroot/tomcat/webapps/spectrum/lib/clienttopo.jar". You can open the JAR file with an archive-programm like 7zip etc. There are all the topology images are stored.
    issue 2 I would like to be able to create a GC model for the circuit that each of these models will be part of (so a couple of ports, some backhaul clouds and a couple of NRS_Support models) and be able to show the relationship between the models grpahically, maybe even model them.
    GCs can only display connections between models, no other Associations. If you want to model a hierachy like the Chassis Manager or something else, you have define you own Hierarchy Manager. this is much complicated, but it's possible.


  • 7.  RE: Spectrum OneClick customizations

    Posted Jun 27, 2012 03:59 AM
    Hi,

    Just be weary that there are the icons for the devices, and then it seems there are some 'transparent' icons which overlay on top of the original ones, for use when selecting the model, etc. You will need to create the icon and then also have the 'overlays'.
    There are quite a lot of icons in the collection so perhaps it might be easier to use some which already exist. You will also need to make the different colours of the icons (green, yellow, orange, red, green, blue and grey). In some cases you might also need to make 'small' versions of the icons for use in the left pane.

    Regards,

    Frank