Now, I know the an Avaya switch product "ERS 5510-24T", how can I find the Object identifier for the product without using sysObjectID? Because before use snmpget to get the OID, we need have static list that use to map the OID, and then we know what the product is.
You have to use sysObjectID for proper network discovery. There is no other way around to identify the device/equipment via SNMP. The target OID is a part RFC1213 (MIB-II)
Object Name: sysObjectID
Object ID: 1.3.6.1.2.1.1.2.0
Object Syntax: OBJECT IDENTIFIER
Object Access: read-only
Object Status: mandatory
Object Description: The vendor's authoritative identification of the
network management subsystem contained in the
entity. This value is allocated within the SMI
enterprises subtree (1.3.6.1.4.1) and provides an
easy and unambiguous means for determining `what
kind of box' is being managed. For example, if
vendor `Flintstones, Inc.' was assigned the
subtree 1.3.6.1.4.1.4242, it could assign the
identifier 1.3.6.1.4.1.4242.1.1 to its `Fred
Router'.
You can use the following command from Net-SNMP package to get the value via SNMPv2C directly from device/equipment:
snmpget -v2c -c public device_addr 1.3.6.1.2.1.1.2.0
The vendors usually have a MIB that identifies its products. For Avaya I found the G3-AVAYA-MIB with some product OIDs, and the Nortel S5-REG-MIB which seems to be more appropriate. If you want to support a vendor, you'll have to search for the OIDs, or ask them.
Mentioned OID is SNMPv2-MIB::sysDescr.0, with numric value .1.3.6.1.2.1.1.1.0
Reference here
Exmaple using MIB name:
snmpget -v2c -c public rb750 SNMPv2-MIB::sysDescr.0 -On
Output
.1.3.6.1.2.1.1.1.0 = STRING: Some device
Exmaple using OID:
snmpget -v2c -c public rb750 .1.3.6.1.2.1.1.1.0
Output
SNMPv2-MIB::sysDescr.0 = STRING: Some device
GET sysObjectId.0 (1.3.6.1.2.1.1.2.0)
From that, you get what looks like on OID. The sixth (zero based!) element of that is the enterprise id.
Now you can zero in on the model, firmware, serial number, etc. of the device.
I use a map from enterprise Id to a collection of OIDs yanked from MIBs for this and I just keep tossing OIDs at the device until it likes one of them.
For example, if I know it's ZyXEL and I want to know the serial number I try these until one hits.
("ZyXEL Communications Corp.",
Seq(".1.3.6.1.4.1.890.1.15.3.82.2.10.0",
".1.3.6.1.4.1.890.1.5.8.55.1.10.0",
".1.3.6.1.4.1.890.1.5.8.18.1.10.0",
".1.3.6.1.4.1.890.1.5.8.19.1.10.0",
".1.3.6.1.4.1.890.1.5.8.16.1.10.0",
".1.3.6.1.4.1.890.1.15.3.1.12.0",
".1.3.6.1.4.1.890.1.5.8.59.1.10.0",
".1.3.6.1.4.1.890.1.5.8.60.1.10.0",
".1.3.6.1.4.1.890.1.5.8.56.1.10.0",
".1.3.6.1.4.1.890.1.5.8.21.1.10.0",
".1.3.6.1.4.1.890.1.5.8.27.1.10.0",
".1.3.6.1.4.1.890.1.5.8.73.1.10.0",
".1.3.6.1.4.1.890.1.5.8.53.1.10.0",
".1.3.6.1.4.1.890.1.5.8.23.1.10.0",
".1.3.6.1.4.1.890.1.5.8.72.1.10.0",
".1.3.6.1.4.1.890.1.5.8.12.1.10.0",
".1.3.6.1.4.1.890.1.5.8.20.1.10.0",
".1.3.6.1.4.1.890.1.5.8.68.1.10.0",
".1.3.6.1.4.1.890.1.5.12.47.1.10.0",
".1.3.6.1.4.1.890.1.5.8.46.1.10.0")),
Related
I'm trying to retrieve an address on a standard entity.
the request is the following :
https://mycrm.api.crm4.dynamics.com/api/data/v9.1/contacts(guid)
In this example, I get all fields, but the ones that is of interest to me is address1_addressid, which seems to be a Guid, referencing some of record, but I cannot find it in the "Many to One" relationship list I retrieved using the following command :
https://mycrm.api.crm4.dynamics.com/api/data/v9.1/EntityDefinitions(LogicalName='contact')?$select=LogicalName&$expand=ManyToOneRelationships($select=ReferencingAttribute,ReferencedEntity)
I would like to retrieve those addresses in a generic manner, as I'm working on a generic NetStandard 2.0 library. I won't be able to know on which entity I'll be working, and thus won't be able to hard-code a list of addresses field names.
Here's one way to find the Contact to Address relationship:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/EntityDefinitions(LogicalName='customeraddress')?$select=LogicalName&$expand=ManyToOneRelationships($select=ReferencingAttribute,ReferencedEntity)
I got an error with https://myOrg.api.crm.dynamics.com/api/data/v9.1/contacts(guid)?$expand=address1_addressid.
I looked into the MetaData and discovered that address1_addressid has a type of Primary Key:
While a normal lookup field has a type of Lookup:
Considering the error message that appears when attempting to expand address1_addressid, I think the issue is address1_addressid's data type.
Property 'address1_addressid' on type 'Microsoft.Dynamics.CRM.contact'
is not a navigation property or complex property. Only navigation
properties can be expanded.
It would seem that rather than using $expand to get the address details, you'd have to make a separate call for it:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/customeraddresses(guid)
UPDATE
By reviewing the full Contact-Address relationship, via this query: https://myOrg.api.crm.dynamics.com/api/data/v9.1/EntityDefinitions(LogicalName='customeraddress')?$select=LogicalName&$expand=ManyToOneRelationships.
I discovered the ReferencedEntityNavigationPropertyName was set to Contact_CustomerAddress.
The error message before talked about the Navigation property so I gave it a shot. Using that property named allowed me to expand the Address info from the Contact:
https://myOrg.api.crm.dynamics.com/api/data/v9.1/contacts(guid)?$expand=Contact_CustomerAddress
Interestingly, expanding that navigation property returns all 3 customer addresses:
I'm implementing an SNMP agent in python and am using the MIB HOST-RESOURCES-MIB. One of the fields that I need to set is hrSWRunID. This OID is defined to be of type ProductID and the definition for ProductID states
ProductID ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"This textual convention is intended to identify the
manufacturer, model, and version of a specific
hardware or software product. It is suggested that
these OBJECT IDENTIFIERs are allocated such that all
products from a particular manufacturer are registered
under a subtree distinct to that manufacturer. In
addition, all versions of a product should be
registered under a subtree distinct to that product.
With this strategy, a management station may uniquely
determine the manufacturer and/or model of a product
whose productID is unknown to the management station.
Objects of this type may be useful for inventory
purposes or for automatically detecting
incompatibilities or version mismatches between
various hardware and software components on a system.
For example, the product ID for the ACME 4860 66MHz
clock doubled processor might be:
enterprises.acme.acmeProcessors.a4860DX2.MHz66
A software product might be registered as:
enterprises.acme.acmeOperatingSystems.acmeDOS.six(6).one(1)
"
SYNTAX OBJECT IDENTIFIER
-- unknownProduct will be used for any unknown ProductID
-- unknownProduct OBJECT IDENTIFIER ::= { 0 0 }
From this I assumed that a value of com.mycompany.mydepartment.myapp.appversion would suffice but when I run the code it fails with an error ProductID: invalid literal for int() with base 0: 'com'\n"]
With a bit of experimentation I finally managed to run my code with a ProductID set to a set of numbers such as {1, 2, 3}.Although my code now works I'm no clearer on what a correct value should be.
Can anyone shed any light on what ProductID is or should be?
The ProductID would be the OBJECT IDENTIFIER of a MIB object defined
under your enterprise MIB. A good start would be to make it the same as
the sysObjectID of your system group.
The header file CoreAudio/AudioHardware.h refers to a class "AudioBox" and indicates that it is distinct from but related to the class "AudioDevice". Searching developer.apple.com yields no hits for AudioBox. There is, unfortunately, a commercial product called AudioBox™, which makes googling for the term painfully low-yield.
Here are the comments containing the references:
kAudioHardwarePropertyBoxList
An array of AudioObjectIDs that represent all the AudioBox
objects currently provided by the system.
kAudioHardwarePropertyTranslateUIDToBox
This property fetches the AudioObjectID that corresponds to the
AudioBox that has the given UID. The UID is passed in via the qualifier as a CFString while the AudioObjectID for the AudioBox is
returned to the caller as the property's data. Note that an error
is not returned if the UID doesn't refer to any AudioBoxes.
Rather, this property will return kAudioObjectUnknown as the value of the property.
The header file: AudioHardwareBase.h contains numerous references to AudioBox, but does not define or explain it, although it associates it with AudioDevice.
Searching the docs via XCode just takes me back to AudioHardwareBase.h.
I can infer that perhaps an "AudioBox" is an audio device that is accessed via a plugin. But this does not appear to be stated anywhere.
So What Is An AudioBox?
An AudioBox is a container of (usually) AudioDevices
can somebody please explain difference between those two terms, when I'm trying to print
structs from Win32_AllocatedResource() I can find pnp device id (something like PCI\\VEN_...)
and when I'm trying to print structs from Win32_IDEControllerDevice() I can find device id (something like IDE\\CDROM...)
but what is the difference why do I need both of them? thanks in advance
Win32_AllocatedResource gives you the assignment of a given resource (e.g. a DMA starting address) to some "device" (or "object"), which when ResultClass = Win32_IDEController, is the controller.
Win32_IDEControllerDevice gives you the list of "devices" (or "object") that are connected to a certain controller, the Antecedent key is the DeviceID of the controller whereas the Dependent key is the DeviceID of the storage unit.
WinAPI's GetAdaptersInfo() fills structure AdapterInfo which has field called AdapterName. What does this field mean? What's the point in it? In my case it holds string "{C01E7744-531D-401F-8EA6-D76D3AF35555}" (including curly braces).
P.S.: beside AdapterName there is pretty clear (for me) field called Description with value (in my case):
"Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC - VirtualBox Host Interface Networking Driver Miniport"
what makes me even more confused with AdapterName.
Looks like it's just a GUID that windows assigns to the adapter, probably as a unique identifier that you can use in some other API call to reference that adapter specifically. For example GetAdapterIndex.
Most IP helper functions seem to take an adapter index, but if you had an app that manipulated network adapters, you probably wouldn't want to store the index of a specific adapter in your app as that could change when adapters are added or removed. So you would store the name of the adapter, then use GetAdapterIndex to get the index for it when needed.
Its formatted like so
GetAdapterIndex(L"\\device\\tcpip_{FD2046B5-1DA0-40A2-9F28-DE4D6F0EBE22}", &index);
I have no idea where this is actually documented officially but found it sourced here: https://chromium.googlesource.com/external/qemu/+/refs/heads/master/qga/commands-win32.c
Description is the user-friendly name associated with AdapterName.
Sources:
http://www.delphigroups.info/2/8/215347.html