⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instalias.mof

📁 Pegasus is an open-source implementationof the DMTF CIM and WBEM standards. It is designed to be por
💻 MOF
字号:
//%2006//////////////////////////////////////////////////////////////////////////// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation, The Open Group.// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; VERITAS Software Corporation; The Open Group.// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;// EMC Corporation; Symantec Corporation; The Open Group.//// Permission is hereby granted, free of charge, to any person obtaining a copy// of this software and associated documentation files (the "Software"), to// deal in the Software without restriction, including without limitation the// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or// sell copies of the Software, and to permit persons to whom the Software is// furnished to do so, subject to the following conditions:// // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.////==============================================================================// Example of use of Instance Alias// Defines a Class with key properties[Version ("2.2.0")]class X{     [key]     string key1;     [key]     string key2;     string valuePropertya;};// define the class Y[Version ("2.2.0")]class Y{     [key]     string keya;      [key]     string keyb;     string valuePropertyb;};// Define as association between X and Y[association, Version ("2.2.0")]class A{     [key] X ref left;     [key] Y ref right;};// Define as association between A and Y[association, Version ("2.2.0")]class B{     [key] A ref left1;     [key] Y ref right1;};// Define as association between B and Y[association, Version ("2.2.0")]class C{     [key] B ref left;     [key] Y ref right;};// Create an instance of Xinstance of X{     key1 = "Jimmy Smith";     key2 = "son";     valuePropertya= "an instance of class X";};// Create an instance of Xinstance of X as $X_Alias{     key1 = "John Smith";     key2 = "father";     valuePropertya= "instance of class X";};instance of Y as $Y_Alias{     keya = "John Jones";     keyb = "Grandfather";     valuePropertyb= "instance of class Y";};// Instance of the association using instance Aliasinstance of A as $A_Alias{     left = $X_Alias;     right = $Y_Alias;};instance of B as $B_Alias{     left1 = $A_Alias;     right1 = $Y_Alias;};instance of C as $C_Alias{     left = $B_Alias;     right = $Y_Alias;};// More stuf to compile using classes from the CIM_InterOp.mof to better test aliases // instances of registered profile for test.instance of CIM_RegisteredProfile as $PROF1//instance of CIM_RegisteredProfile{    InstanceID = "PEG_12345678";    RegisteredOrganization = 2;    REgisteredName = "profile1";    RegisteredVersion = "1.0.0";    AdvertiseTypes = {3};};instance of CIM_RegisteredProfile as $PROF2//instance of CIM_RegisteredProfile{    InstanceID = "PEG_12345679";    RegisteredOrganization = 2;    REgisteredName = "profile2";    RegisteredVersion = "1.0.0";    AdvertiseTypes = {3};};// associaton that establishs reference  from profile2 to profile 1// I.E. profile2 is dependent on profile 1Instance of CIM_ReferencedProfile{    Antecedent = $PROF1;    // Antecedent = CIM_RegisteredProfile.InstanceID="PEG_12345678";    Dependent = $PROF2;    // Dependent  = CIM_RegisteredProfile.InstanceID="PEG_12345679";};// Sample subprofileinstance of CIM_RegisteredSubProfile as $PROF3// instance of CIM_RegistgredSubProfile{    InstanceID = "PEG_12345678-1";    RegisteredOrganization = 2;    REgisteredName = "subprofile1";    RegisteredVersion = "1.0.0";    AdvertiseTypes = {3};};instance of CIM_SubProfileRequiresProfile{    Antecedent = $PROF1;    // Antecedent = CIM_RegisteredProfile.InstanceID="PEG_12345678";    Dependent = $PROF3;    // Dependent  = CIM_RegisteredSDubProfile.InstanceID="PEG_12345679-1";};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -