ГОСТ Р ИСО/МЭК 19831—2017
«attribute name=’Location* namespace="
http://example.orgr
type=’stnng’V»
«/ResourceMetadata»
В следующем примере представлен тот же Ресурс VolumeConfiguration. в котором атрибут
"Location" ограничен рядом значений и является обязательным:
«ResourceMetadata xmlns^ttptfschemas.dmtf.org/cimi/l’»
<id>
http://example.org/types/VC
</id>
<typeURI>
http://schemas.dmtf.org/cimi/1A/olumeConfiguration
</typeURI>
<name> VolumeConfiguration </name>
«attribute name=*format" type=*string* required=*false"»
«value» ext4 «/value»
«value> ntfs «/value>
«/attribute»
«attributename=T_ocation"namespace="
http://example.org/"
type=*string"
required-’true’»
«value» NYC «/value»
«value» LAX «/value»
«/attribute»
«/ResourceMetadata»
В следующем примере указан
тот
же самый Ресурс VolumeConfiguration. сериализованный
в
JSON:
{ "resourceURI": ’
http://schemas.dmtf.
0
rg/cimi/l/V
0
lumeC
0
nfigurati
0
n"
,
’id": "
http://example.org/types/VC"
.
’typeURI": "
http://schemas.dmtf.org/cimi/1/VolumeConfiguration
".
"name": “VolumeConfiguration*,
"attributes". [
{ "name": "format”,
"type": ’string",
’required": false.
’values’: [ ’oxt4’. "ntfs’ ]
}.
{ "name": "Location",
’namespace": "
http://example.org"
,
’type’: ’string",
’required": true.
’values’: [ "NYC", "LAX" ]
}
l
}
В следующем примере представлен Ресурс Volume, сериализованный в JSON. который обеспе
чивает действие сжатия данных. В данном примере возвращенный метод (POST) предназначен для
протокола HTTPCIMI, однако при реализации другого протокола (например. SOAP), метод будет иным:
{ "resourceURI*: ’
http://schemas.dmtf.
0
rg/cimi/l/V
0
lumeC
0
nfigurati
0
n"
,
’id": "
http://example.
0
rg/types/V
".
’typeURI’: "
http://schemas.dmtf.
0
rg/cimi/l/V
0
lume
",
"name": “Volume",
"actions’: [
{
"name": "compress",
”uri’: ’
http://example.org/cimi/action/compress
"
"description": "Compress the data stored in the Volume".
"method": "POST
}
]
}
5.11.2 Возможности
URI возможностей, определенных в настоящем стандарте, приведены в таблице 7. Поставщики
могут определить новые URI. причем рекомендуется, чтобы данные URI указывали на документы с опи-
34