Aug 28
Sore Thumb
Aug 23
Mobile Devices MP for Service Manager 2010
I now look back at the last 4 posts and realise there was one hell of a lot of waffle there!
In response to this post (and most likely many other requests), Patrik Sundqvist produced an example of the MP I was after, inclusive of a new form.
If you are going to manipulate the xml, make sure you read all of this post for a few potential ”gotchas”
Using Patrik’s example, that I have produced this MP;
The download includes the Mobile Models MP because the Mobile Devices MP is dependent on that.
The download is version 1, probably a bit rough to a developer but if you want to use this go ahead, however I recommend that you seal the final xml’s (after you customise for your scenario) and then bundle the Mobile Devices MP with the DLL, i.e. have the newly sealed MobileDevicesMP.mp, the dll and the ps1 file in the same directory and run the powershell script.
Don’t forget to import the Model’s MP before you import your Devices mpb.
Disclaimers of course….back everything up before trying in your dev environment, and I don’t want to know anything if it breaks your setup.
Thanks to my boss for allowing me to share this, we get heaps from the community and are happy to be able return something!
Comments are off for this postJul 23
Service Manager – New CI Objects MP – Part 4 – Folders and Views
Woohoo – TGI Friday! and I’m keen to get this wrapped up.
Look, this MP is far from perfect so the idea is not just to give it to you but to help you understand it so you can manipulate it for your situation, and I hope make it better.
For example, the Mobiles MP has a folder with a view under it. The folder appears under the root of the Configuration Items. Imagine if you had 10 of these MP’s covering different peripherals, that folder structure probably wouldn’t suit.
There are a few ways to approach that but I suspect easiest is to just leave the folders and views out of the MP and once you have all your MP’s imported, create a folder called Peripherals, then create all the views under it, noting that this would all be in a new unsealed MP which you could choose to export and seal.
Lets get back on track…..these are the steps for how I created this MP;
- Open Auth tool
- Create new CI Object
- Add Properties
- close tool and in the xml add the enum list and the lines to show the list
- return to the auth tool and configure the Models property to view that list
- configure the centres property to view the centres list
- back into the xml and add the views
- back (again) to the Auth tool and seal the MP
- import the Centres MP and then the Mobiles MP
Let me show you some stuff in the Auth tool!
Open the Mobiles.xml in the Authoring tool
- expand Mobiles > Classes > Mobile
- Double click Mobile so that you can see the properties
- notice the extra properties > right click each and select details
- notice the fields, note the data types and how they differ
- notice that one property must be Key=True, that means that property must be 100% unique so CI’s don’t match exactly, every object must have one Key property
- notice for the lists I don’t have a default value and note the bind paths
- right click Mobile > Properties > review the info > note that Singleton and Abstract are false because we are going to have heaps of Mobile CI objects, there isn’t going to be just one.
- Notice there is NO FORM, because we are going to extend the generic form!
In the pic above notice some of the fields are pretty wide, you can manipulate their look in the following code section however the width of the column appears to be impacted by the size of the opening window when you view the CI! As far as I can tell, adjusting the width here will do nothing, but I could be wrong?
<Presentation>
<Columns>
<mux:ColumnCollection xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mux="http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:data="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess">
<mux:Column Name="AssetStatus.DisplayName" DisplayMemberBinding="{Binding Path=AssetStatus.DisplayName}" Width="100" DisplayName="AssetStatus" Property="AssetStatus.DisplayName" DataType="s:String" />
<mux:Column Name="AssetTag" DisplayMemberBinding="{Binding Path=AssetTag}" Width="100" DisplayName="AssetTag" Property="AssetTag" DataType="s:String" />
<mux:Column Name="Centre.DisplayName" DisplayMemberBinding="{Binding Path=Centre.DisplayName}" Width="100" DisplayName="Centre" Property="Centre.DisplayName" DataType="s:String" />
<mux:Column Name="$DisplayName$" DisplayMemberBinding="{Binding Path=$DisplayName$}" Width="100" DisplayName="DisplayName" Property="$DisplayName$" DataType="s:String" />
<mux:Column Name="IMEI" DisplayMemberBinding="{Binding Path=IMEI}" Width="100" DisplayName="IMEI" Property="IMEI" DataType="s:String" />
<mux:Column Name="Model.DisplayName" DisplayMemberBinding="{Binding Path=Model.DisplayName}" Width="100" DisplayName="Model" Property="Model.DisplayName" DataType="s:String" />
</mux:ColumnCollection>
</Columns>
Careful manipulating ID’s and names as they are referenced in other parts of the MP, but you should be starting to understand that by now?
Also notice in the pic that I’m using the Display Name to also show the Asset Tag…I could just remove the Asset tag property? What suits your situation?
The Views and Folders, well I’m still working up on this so the best thing I can do is refer you to the a section in the Authoring guide that comes with the Authoring tool, specifically the example of the Projectors MP (Catgeory and Presentation section from Page 33 of the July 2010 release), to help you understand what is going on.
Also have a look at this and this.
I’ve pretty much done a cut and paste from the examples in the Auth guide and manipulated to suit my MP.
I’d like to point out that in the languages section there are what appears to be two entries for some items, for example, IMEI, one is as a column header for the view and the other as a sub element for the Property of Mobile called IMEI, make sure you change the right ones if making changes.
I’ll wrap up now with Sealing the MP.
Quick overview on Sealing here but note it was written prior to being able to do it in the Auth tool.
You can now seal in the Auth tool by simply right clicking “Mobiles” and selecting “Seal Management Pack” there is however one thing you will need and that is an snk (PairKey) file. If you are familiar with SCOM you probably already have one, if not, do this;
- download sn.exe from Microsoft or it maybe on your PC already, its part of .net and visual studio!
- copy sn.exe to a folder lets call it, c:\snk
- open a command prompt and browse to C:\snk
- Run the following; sn -k c:\snk\PairKey.snk
- and you will notice that your PairKey.snk has been created
Keep it safe, you can use that as many times as you want.
Right…I think that’s it, I got to go do some real work…thanks to the boss for letting me take some time to do these posts! As a company we have got heaps from the community (especially with SCOM) and we acknowledge we need to give back!
I hope there isn’t anything wrong in the past few posts, I’ve written it quickly with minimal review…I’m not claiming it as a masterpiece, lots to do like linking to users etc…I just hope it helps you get going like it has for me!
Slainte.
* * * * *
Important Update!
* * * * *
Rushing to do this post I missed something that I now see in my testing!
From this post;
6. I manually created a software CI and related that CI to a person in the field “Configuration Items: Computers, Services and People” But when I open the person record I related that software CI to, I don’t see it.
ANSWER: When you add it from that direction you are creating a relationship of a different relationship type (CI Relates to CI) vs. the ones that you see in the User form are Custodian and Primary User. It’s definately confusing and we really should show the CI Relates to CI list in the User form like we do on all other CI forms, but for some reason it’s not there right now.
So above is what I see, but I want to be able to either look at the user CI and see what other CI’s they relate to or on my generic form I want to be able to assign a custodian.
When I asked the question about building on the generic form, Travis said;
You’ll need to design a custom form only in cases where you need to show related objects which are related in a 1:many or many:many relationship type.
Now I would think adding custodian/primary user picker to my generic form is a 1:1 relationship so it maybe possible?
I’ll go off and investigate and make a post on it which I will link to from here.
* * * * *
Further Update!
* * * * *
No commentsJul 22
Service Manager – New CI Objects MP – Part 3 – Mobiles MP
OK so we have sealed our CompanyCentreMP and placed a copy in the library directory of the authoring tools install folder (so the Auth tool can reference it easily).
We did the last MP in xml because lists are easier to do there against creating them in the Authoring Tool where there are limitations as to what you can do with lists.
The Authoring Tool also appears to be challenged with folders and views. I’m sure all will be included in the next revision?
This MP’s creation is a combination of xml editing and the Authoring Tool.
The main things this MP contains are;
- a CI object called Mobile with a number of properties
- one of the properties making reference to a Centres list
- a list of mobile models also linked to one of the properties
- a folder
- a view of “All Mobiles”
Here it is!
<ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Manifest>
<Identity>
<ID>Mobiles</ID>
<Version>1.0.0.0</Version>
</Identity>
<Name>Mobiles</Name>
<References>
<Reference Alias="System">
<ID>System.Library</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="Console">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
<Version>7.0.5826.859</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="UIAuthoring">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SMConfig">
<ID>ServiceManager.ConfigurationManagement.Library</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SMConfigMgr">
<ID>Microsoft.SystemCenter.ConfigurationManager</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="CompanyCentresMP">
<ID>CompanyCentresMP</ID>
<Version>1.0.0.0</Version>
<PublicKeyToken>91a4572a954b0638</PublicKeyToken>
</Reference>
</References>
</Manifest>
<TypeDefinitions>
<EntityTypes>
<ClassTypes>
<ClassType ID="Mobile" Accessibility="Public" Abstract="false" Base="System!System.ConfigItem" Hosted="false" Singleton="false" Extension="false">
<Property ID="Model" Type="enum" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" EnumType="Mobile.Models" />
<Property ID="IMEI" Type="string" AutoIncrement="false" Key="true" CaseSensitive="false" MaxLength="256" MinLength="0" Required="true" DefaultValue="Enter IMEI Here" />
<Property ID="PurchaseDate" Type="datetime" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" />
<Property ID="AssetTag" Type="string" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="25" MinLength="0" Required="false" DefaultValue="Asset Tag" />
<Property ID="WarrantyExpiry" Type="datetime" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" />
<Property ID="Centre" Type="enum" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" EnumType="CompanyCentresMP!Centres.Enum" />
</ClassType>
</ClassTypes>
<EnumerationTypes>
<EnumerationValue ID="Mobile.Models" Accessibility="Public" />
<EnumerationValue ID="Blackberry.7130" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8100" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8110" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8120" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8300" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8310" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8520" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8700" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8707" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8800" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.8900" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="Blackberry.9000" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="iPhone.3G" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="iPhone.3GS" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="iPhone.4" Accessibility="Public" Parent="Mobile.Models" />
<EnumerationValue ID="iPad.3G" Accessibility="Public" Parent="Mobile.Models" />
</EnumerationTypes>
</EntityTypes>
</TypeDefinitions>
<Categories>
<Category ID="Mobiles.Category" Value="Console!Microsoft.EnterpriseManagement.ServiceManager.ManagementPack">
<ManagementPackName>Mobiles</ManagementPackName>
<ManagementPackVersion>1.0.0.0</ManagementPackVersion>
</Category>
<Category ID="CategoryId_78625006_7239_4326_aee7_3d4486d0106a" Target="Mobile.Models" Value="UIAuthoring!Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring.EnumerationViewTasks" />
<Category ID="CategoryId_ebd7bab0_6f43_4b2e_9a5c_86be1a054135" Target="Mobile.Models" Value="System!VisibleToUser" />
<Category ID="Category.9b1ab2114aa0481ebf1d4f99fb25233e" Target="Folder.Mobiles" Value="Console!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.FolderTasks" />
<Category ID="Category.9605b06a3e574918ab6fa4dbf730944b" Target="View.AllMobilesView" Value="Console!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ViewTasks" />
<Category ID="Category.8fe0209fc3f44e54a6b040eb3d828dcd" Target="View.AllMobilesView" Value="UIAuthoring!Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring.CreateTypeCategory" />
</Categories>
<Presentation>
<Views>
<View ID="View.AllMobilesView" Accessibility="Public" Enabled="true" Target="Mobile" TypeID="Console!GridViewType" Visible="true">
<Category>NotUsed</Category>
<Data>
<Adapters>
<Adapter AdapterName="dataportal:EnterpriseManagementObjectAdapter">
<AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
<AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectAdapter</AdapterType>
</Adapter>
<Adapter AdapterName="viewframework://adapters/AdvancedList">
<AdapterAssembly>Microsoft.EnterpriseManagement.UI.ViewFramework</AdapterAssembly>
<AdapterType>Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter</AdapterType>
</Adapter>
<Adapter AdapterName="omsdk://Adapters/Criteria">
<AdapterAssembly>Microsoft.EnterpriseManagement.UI.SdkDataAccess</AdapterAssembly>
<AdapterType>Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.SdkCriteriaAdapter</AdapterType>
</Adapter>
</Adapters>
<ItemsSource>
<AdvancedListSupportClass DataTypeName="" AdapterName="viewframework://adapters/AdvancedList" FullUpdateAdapter="dataportal:EnterpriseManagementObjectAdapter" FullUpdateFrequency="1" DataSource="mom:ManagementGroup" IsRecurring="true" RecurrenceFrequency="30000" Streaming="true" xmlns="clr-namespace:Microsoft.EnterpriseManagement.UI.ViewFramework;assembly=Microsoft.EnterpriseManagement.UI.ViewFramework" xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib">
<AdvancedListSupportClass.Parameters>
<QueryParameter Parameter="TargetClass" Value="Mobile" />
</AdvancedListSupportClass.Parameters>
</AdvancedListSupportClass>
</ItemsSource>
<Criteria />
</Data>
<Presentation>
<Columns>
<mux:ColumnCollection xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:mux="http://schemas.microsoft.com/SystemCenter/Common/UI/Views/GridView" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:data="clr-namespace:Microsoft.EnterpriseManagement.UI.SdkDataAccess.Common;assembly=Microsoft.EnterpriseManagement.UI.SdkDataAccess">
<mux:Column Name="AssetStatus.DisplayName" DisplayMemberBinding="{Binding Path=AssetStatus.DisplayName}" Width="100" DisplayName="AssetStatus" Property="AssetStatus.DisplayName" DataType="s:String" />
<mux:Column Name="AssetTag" DisplayMemberBinding="{Binding Path=AssetTag}" Width="100" DisplayName="AssetTag" Property="AssetTag" DataType="s:String" />
<mux:Column Name="Centre.DisplayName" DisplayMemberBinding="{Binding Path=Centre.DisplayName}" Width="100" DisplayName="Centre" Property="Centre.DisplayName" DataType="s:String" />
<mux:Column Name="$DisplayName$" DisplayMemberBinding="{Binding Path=$DisplayName$}" Width="100" DisplayName="DisplayName" Property="$DisplayName$" DataType="s:String" />
<mux:Column Name="IMEI" DisplayMemberBinding="{Binding Path=IMEI}" Width="100" DisplayName="IMEI" Property="IMEI" DataType="s:String" />
<mux:Column Name="Model.DisplayName" DisplayMemberBinding="{Binding Path=Model.DisplayName}" Width="100" DisplayName="Model" Property="Model.DisplayName" DataType="s:String" />
</mux:ColumnCollection>
</Columns>
<ViewStrings>
<ViewString ID="AssetStatus">$MPElement[Name="AssetStatus"]$</ViewString>
<ViewString ID="AssetTag">$MPElement[Name="AssetTag"]$</ViewString>
<ViewString ID="Centre">$MPElement[Name="Centre"]$</ViewString>
<ViewString ID="DisplayName">$MPElement[Name="DisplayName"]$</ViewString>
<ViewString ID="IMEI">$MPElement[Name="IMEI"]$</ViewString>
<ViewString ID="Model">$MPElement[Name="Model"]$</ViewString>
</ViewStrings>
</Presentation>
</View>
</Views>
<Folders>
<Folder ID="Folder.Mobiles" Accessibility="Public" ParentFolder="SMConfig!ServiceManager.Console.ConfigurationManagement.ConfigItem.Root" />
</Folders>
<FolderItems>
<FolderItem ElementID="Console!Microsoft.EnterpriseManagement.ServiceManager.UI.Console.Task.CreateGridView" ID="FolderItem.FolderItem1234" Folder="Folder.Mobiles" />
<FolderItem ElementID="View.AllMobilesView" ID="FolderItem.AllMobilesView2" Folder="Folder.Mobiles" />
</FolderItems>
<ImageReferences>
<ImageReference ElementID="Folder.Mobiles" ImageID="SMConfig!ConfigItemImage16x16" />
<ImageReference ElementID="View.AllMobilesView" ImageID="SMConfig!ConfigItemImage16x16" />
</ImageReferences>
<StringResources>
<StringResource ID="AssetStatus" />
<StringResource ID="AssetTag" />
<StringResource ID="Centre" />
<StringResource ID="DisplayName" />
<StringResource ID="IMEI" />
<StringResource ID="Model" />
</StringResources>
</Presentation>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Folder.Mobiles">
<Name>Mobiles</Name>
</DisplayString>
<DisplayString ElementID="AssetStatus">
<Name>Status</Name>
</DisplayString>
<DisplayString ElementID="AssetTag">
<Name>Asset Tag</Name>
</DisplayString>
<DisplayString ElementID="Centre">
<Name>Centre</Name>
</DisplayString>
<DisplayString ElementID="DisplayName">
<Name>Display Name</Name>
</DisplayString>
<DisplayString ElementID="IMEI">
<Name>IMEI</Name>
</DisplayString>
<DisplayString ElementID="Model">
<Name>Model</Name>
</DisplayString>
<DisplayString ElementID="View.AllMobilesView">
<Name>All Mobile Devices</Name>
</DisplayString>
<DisplayString ElementID="Mobile">
<Name>Mobile</Name>
<Description>Mobile Phone/Data type devices excluding Laptops</Description>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="IMEI">
<Name>IMEI</Name>
<Description>The unique IMEI code for the device</Description>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="Model">
<Name>Model</Name>
<Description>Contact the Service Manager Admin if the model is not listed</Description>
</DisplayString>
<DisplayString ElementID="Mobile.Models">
<Name>Mobile Models</Name>
<Description></Description>
</DisplayString>
<DisplayString ElementID="Blackberry.7130">
<Name>Blackberry 7130</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8100">
<Name>Blackberry 8100</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8110">
<Name>Blackberry 8110</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8120">
<Name>Blackberry 8120</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8300">
<Name>Blackberry 8300</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8310">
<Name>Blackberry 8310</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8520">
<Name>Blackberry 8520</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8700">
<Name>Blackberry 8700</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8707">
<Name>Blackberry 8707</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8800">
<Name>Blackberry 8800</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.8900">
<Name>Blackberry 8800</Name>
</DisplayString>
<DisplayString ElementID="Blackberry.9000">
<Name>Blackberry 9000</Name>
</DisplayString>
<DisplayString ElementID="iPhone.3G">
<Name>iPhone 3G</Name>
</DisplayString>
<DisplayString ElementID="iPhone.3GS">
<Name>iPhone 3GS</Name>
</DisplayString>
<DisplayString ElementID="iPhone.4">
<Name>iPhone 4</Name>
</DisplayString>
<DisplayString ElementID="iPad.3G">
<Name>iPad 3G</Name>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="AssetTag">
<Name>Asset Tag</Name>
<Description>Asset Tag</Description>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="PurchaseDate">
<Name>Purchase Date</Name>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="WarrantyExpiry">
<Name>Warranty Expiry</Name>
</DisplayString>
<DisplayString ElementID="Mobile" SubElementID="Centre">
<Name>Centre</Name>
</DisplayString>
<DisplayString ElementID="Mobiles">
<Name>Mobiles</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPack>
Now lets go through it….
You saw from Part 2 that you must save this out as Mobiles.xml or if you are going to change the name you now know what fields to change (ID, Name and DisplayName) and how the xml files name must match the ID, BUT notice there is a second reference half way down under category to this MP name, you also need to change that!
And you might have changed CompanyCentreMP.xml’s name as well. Notice the reference to it in the “Reference” section at the start, you need to update that.
And thats not the last change, See this in the “ClassTypes” section;
<Property ID="Centre" Type="enum" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" EnumType="CompanyCentresMP!Centres.Enum" />
Couple of things to potentially do here, possibly the MP name change, also Centres.Enum for the list name if you changed that and the property ID of Centre may no longer be valid so you may need to change that not just here but in several locations down through the MP where it is referred to.
We can make that change in the Authoring tool, but trust me its easier done here and now.
Ok, now lets jump to the internal list (Enum).
It is very similar to the CompanyCentresMP list isn’t it, a tad simpler. Two things to notice/remind yourself of…all the items are referenced with friendly names in the LanguagePacks section…and notice in the category area a few lines down from the list that we have the entry to make the list visible.
This is my first MP, I probably should have added the .enum to the ID’s so things are clearer, I might get to that at a later stage (I should have added .property to the properties as well).
So, if you make the reference changes to the CompanyCentresMP and any name changes to this MP (eg Mobile to Projector) that you want to do, you could go ahead and open the MP in the Authoring Tool and have a look around.
And thats where I’ll go to in the next post…..
No commentsJul 22
Service Manager – New CI Objects MP – Part 2 – List MP
Before we get stuck into making the mobiles MP, We (the SCSM schema I drew up, the SM users, and myself) have thought about what data, properties, etc. we need recorded.
We figured we need a “centre’s” list, and this list will be referenced by other MP’s so we really should create it in its own MP and seal it up!
Before I go further, here is some reference material that you should quickly review;
Now, our list…it is not going to reference any other MP (but others will reference it) and at the top level it will have a list of the cities where the company has an office.
In a couple of the cities we have multiple buildings and in some we also have multiple floors which will also be listed.
You need to think beyond the Mobiles MP, indeed I reckon for SM you should have everything drawn out before commencing production build.
For the mobiles we only care about the city for cost centre purposes….but other CI MP’s may need the building and floors..hence I’m offering more than is needed now.
Disclaimer – If this screws up your SCSM setup don’t come moaning to me, if you don’t have a dev/test environment and backup strategy you shouldn’t be playing here.
Here it is my CompanyCentresMP in xml;
<ManagementPack ContentReadable="true" SchemaVersion="1.1" OriginalSchemaVersion="1.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<Manifest>
<Identity>
<ID>CompanyCentresMP</ID>
<Version>1.0.0.1</Version>
</Identity>
<Name>CompanyCentresMP</Name>
<References>
<Reference Alias="SMSystem">
<ID>System.Library</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SMConsole">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Console</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
<Reference Alias="SMAuthoring">
<ID>Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring</ID>
<Version>7.0.5826.0</Version>
<PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
</Reference>
</References>
</Manifest>
<TypeDefinitions>
<EntityTypes>
<EnumerationTypes>
<EnumerationValue ID="Centres.Enum" Accessibility="Public" Ordinal="0" />
<EnumerationValue ID="Centres.Sydney.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="1" />
<EnumerationValue ID="Centres.Shanghai.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="2" />
<EnumerationValue ID="Centres.Beijing.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="3" />
<EnumerationValue ID="Centres.HongKong.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="4" />
<EnumerationValue ID="Centres.London.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="5" />
<EnumerationValue ID="Centres.Lima.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="6" />
<EnumerationValue ID="Centres.Lima.L9.Enum" Accessibility="Public" Parent="Centres.Lima.Enum" Ordinal="7" />
<EnumerationValue ID="Centres.Lima.L10.Enum" Accessibility="Public" Parent="Centres.Lima.Enum" Ordinal="8" />
<EnumerationValue ID="Centres.Dublin.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="9" />
<EnumerationValue ID="Centres.Berlin.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="10" />
<EnumerationValue ID="Centres.Berlin.L30.Enum" Accessibility="Public" Parent="Centres.Berlin.Enum" Ordinal="11" />
<EnumerationValue ID="Centres.Berlin.L31.Enum" Accessibility="Public" Parent="Centres.Berlin.Enum" Ordinal="12" />
<EnumerationValue ID="Centres.Dubai.Enum" Accessibility="Public" Parent="Centres.Enum" Ordinal="13" />
<EnumerationValue ID="Centres.Dubai.L42.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="14" />
<EnumerationValue ID="Centres.Dubai.L44.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="15" />
<EnumerationValue ID="Centres.Dubai.L45.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="16" />
<EnumerationValue ID="Centres.Dubai.L46.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="17" />
<EnumerationValue ID="Centres.Dubai.L47.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="18" />
<EnumerationValue ID="Centres.Dubai.L48.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="19" />
<EnumerationValue ID="Centres.Dubai.L49.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="20" />
<EnumerationValue ID="Centres.Dubai.L60.Enum" Accessibility="Public" Parent="Centres.Dubai.Enum" Ordinal="21" />
<EnumerationValue ID="Centres.Sydney.PrimaryDataCentres.Enum" Accessibility="Public" Parent="Centres.Sydney.Enum" Ordinal="22" />
<EnumerationValue ID="Centres.Sydney.SecondaryDataCentres.Enum" Accessibility="Public" Parent="Centres.Sydney.Enum" Ordinal="23" />
<EnumerationValue ID="Centres.Sydney.BLG1.Enum" Accessibility="Public" Parent="Centres.Sydney.Enum" Ordinal="24" />
<EnumerationValue ID="Centres.Sydney.BLG1.L54.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="25" />
<EnumerationValue ID="Centres.Sydney.BLG1.L55.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="26" />
<EnumerationValue ID="Centres.Sydney.BLG1.L56.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="27" />
<EnumerationValue ID="Centres.Sydney.BLG1.L57.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="28" />
<EnumerationValue ID="Centres.Sydney.BLG1.L58.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="29" />
<EnumerationValue ID="Centres.Sydney.BLG1.L59.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="30" />
<EnumerationValue ID="Centres.Sydney.BLG1.L60.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="31" />
<EnumerationValue ID="Centres.Sydney.BLG1.L61.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG1.Enum" Ordinal="32" />
<EnumerationValue ID="Centres.Sydney.BLG2.Enum" Accessibility="Public" Parent="Centres.Sydney.Enum" Ordinal="33" />
<EnumerationValue ID="Centres.Sydney.BLG2.L16.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG2.Enum" Ordinal="34" />
<EnumerationValue ID="Centres.Sydney.BLG2.L17.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG2.Enum" Ordinal="35" />
<EnumerationValue ID="Centres.Sydney.BLG2.L18.Enum" Accessibility="Public" Parent="Centres.Sydney.BLG2.Enum" Ordinal="36" />
</EnumerationTypes>
</EntityTypes>
</TypeDefinitions>
<Categories>
<Category ID="EnumShowViewTasks" Target="Centres.Enum" Value="SMAuthoring!Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring.EnumerationViewTasks" />
<Category ID="EnumVisibleToUser" Target="Centres.Enum" Value="SMSystem!VisibleToUser" />
</Categories>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Centres.Enum">
<Name>Centre</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.Enum">
<Name>Sydney</Name>
</DisplayString>
<DisplayString ElementID="Centres.Shanghai.Enum">
<Name>Shanghai</Name>
</DisplayString>
<DisplayString ElementID="Centres.Beijing.Enum">
<Name>Beijing</Name>
</DisplayString>
<DisplayString ElementID="Centres.HongKong.Enum">
<Name>Hong Kong</Name>
</DisplayString>
<DisplayString ElementID="Centres.London.Enum">
<Name>London</Name>
</DisplayString>
<DisplayString ElementID="Centres.Lima.Enum">
<Name>Lima</Name>
</DisplayString>
<DisplayString ElementID="Centres.Lima.L9.Enum">
<Name>Lima L9</Name>
</DisplayString>
<DisplayString ElementID="Centres.Lima.L10.Enum">
<Name>Lima L10</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dublin.Enum">
<Name>Dublin</Name>
</DisplayString>
<DisplayString ElementID="Centres.Berlin.Enum">
<Name>Berlin</Name>
</DisplayString>
<DisplayString ElementID="Centres.Berlin.L30.Enum">
<Name>Berlin L30</Name>
</DisplayString>
<DisplayString ElementID="Centres.Berlin.L31.Enum">
<Name>Berlin L31</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.Enum">
<Name>Dubai</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L42.Enum">
<Name>Dubai L42</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L44.Enum">
<Name>Dubai L44</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L45.Enum">
<Name>Dubai L45</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L46.Enum">
<Name>Dubai L46</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L47.Enum">
<Name>Dubai L47</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L48.Enum">
<Name>Dubai L48</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L49.Enum">
<Name>Dubai L49</Name>
</DisplayString>
<DisplayString ElementID="Centres.Dubai.L60.Enum">
<Name>Dubai L60</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.PrimaryDataCentres.Enum">
<Name>Primary Data Centre</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.SecondaryDataCentres.Enum">
<Name>Secondary Data Centre</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.Enum">
<Name>Sydney BLG1</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L54.Enum">
<Name>Sydney BLG1 L54</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L55.Enum">
<Name>Sydney BLG1 L55</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L56.Enum">
<Name>Sydney BLG1 L56</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L57.Enum">
<Name>Sydney BLG1 L57</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L58.Enum">
<Name>Sydney BLG1 L58</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L59.Enum">
<Name>Sydney BLG1 L59</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L60.Enum">
<Name>Sydney BLG1 L60</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG1.L61.Enum">
<Name>Sydney BLG1 L61</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG2.Enum">
<Name>Sydney BLG2</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG2.L16.Enum">
<Name>Sydney BLG2 L16</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG2.L17.Enum">
<Name>Sydney BLG2 L17</Name>
</DisplayString>
<DisplayString ElementID="Centres.Sydney.BLG2.L18.Enum">
<Name>Sydney BLG2 L18</Name>
</DisplayString>
<DisplayString ElementID="CompanyCentresMP">
<Name>Company Centres MP</Name>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</ManagementPack>
Copy the above and name it CompanyCentresMP.xml
Now lets go through it so you understand what’s going on and how you can customise it, I’m going to skip through it relatively quickly assuming you at least understand the xml structure…the first part shows the dependencies and the MP version.
To rename the MP change the values for ID and Name to match (no spaces) and rename the xml file with exactly the same name, e.g, for a file renamed CenterlistMP.xml
<ID>CenterlistMP</ID>
<Version>1.0.0.1</Version>
</Identity>
<Name>CenterlistMP</Name>
Dependency section….You may get caught with a Key Token error when you go to seal the MP. This point may not make sense right now but note it for later….fastest solution, look at the xml of any other MP you have made with the Auth tool (or make a blank one and save out to xml), note how the Key Token for the referenced MP’s is the same, simply use that Key Token in my xml i.e. replace
Now go to the LanguagePack section and make similar change there,
<DisplayString ElementID="CompanyCentresMP">
<Name>Company Centres MP</Name>
</DisplayString>
becomes
<DisplayString ElementID="CenterlistMP">
<Name>Center List MP</Name>
</DisplayString>
Ok, now you can start on the new list.
I’m not going to go over the specifics of how to do that, refer to the links above, the structure should be obvious and I think if I get into it here I’ll just confuse things, but to point out …
- The list in this example is new and does not reference an existing list.
- Be very careful doing “Find and Replaces” if you do that do each one by one, and check you are replacing the correct part.
- The entry Ordinal is optional as far as I know, I’m unsure of its purpose and couldn’t be bothered checking it out now ’cause I’m keen to go home (writing this after work but in the office)….
- Keep naming consistency, note the parent child structure in the names.
- The EnumerationValue ID matches an Element ID in the LanguagePacks Section, change/make/delete in parallel to adjustments in the Enumeration section.
Also, see this bit..
<Category ID="EnumShowViewTasks" Target="Centres.Enum" Value="SMAuthoring!Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring.EnumerationViewTasks" />
<Category ID="EnumVisibleToUser" Target="Centres.Enum" Value="SMSystem!VisibleToUser" />
That’s the code that shows the list, notice the value “Centres.Enum” if you change that id in the Enum list, don’t forget to change it here also.
Next is to seal the MP. We need to do this so it can be referenced by the Mobiles MP as well as to protect it from unauthorised change (could lead to data loss).
Once it is sealed we place a copy of the MP into the Library directory of the install location of the Authoring tool (usually C:\Program Files (x86)\Microsoft System Center\Service Manager 2010 Authoring\Library ), so that its easily referenced when we make/modify/copy/whatever our Mobiles MP.
If you don’t know how to seal an MP, I’ll cover that once I go over the Mobiles MP (’cause that will need sealing as well).
No comments