]
Stan Silvert resolved AS7-4811.
-------------------------------
Resolution: Rejected
Stupid Stan! Thanks Brian.
/deployment=*/:read-resource(recursive=true) returns attributes in
value-type field
------------------------------------------------------------------------------------
Key: AS7-4811
URL:
https://issues.jboss.org/browse/AS7-4811
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Affects Versions: 7.1.2.Final (EAP)
Reporter: Stan Silvert
Assignee: Brian Stansberry
Scroll down to the content attribute. Its type is LIST. In value-type, I expect to get
a ModelType so I know what type of list it is. Instead I see a list of sub-attributes.
Shouldn't the value-type always be of type ModelType?
{noformat}
/deployment=*/:read-resource-description(recursive=true)
{
"outcome" => "success",
"result" => [{
"address" => [("deployment" => "*")],
"outcome" => "success",
"result" => {
"description" => "A deployment represents anything that can
be deployed (e.g. an application such as EJB-JAR, WAR, EAR, any kind of standard archive
such as RAR or JBoss-specific deployment) into a server.",
"head-comment-allowed" => true,
"tail-comment-allowed" => false,
"attributes" => {
"name" => {
"type" => STRING,
"description" => "Unique identifier of the
deployment. Must be unique across all deployments.",
"required" => true,
"min-length" => 1,
"nillable" => false,
"access-type" => "read-only",
"storage" => "configuration"
},
"runtime-name" => {
"type" => STRING,
"description" => "Name by which the deployment
should be known within a server's runtime. This would be equivalent to the file name
of a deployment file, and would form the basis for such things as default Java Enterprise
Edition application and module names. This would typically be the same as 'name',
but in some cases users may wish to have two deployments with the same
'runtime-name' (e.g. two versions of \"foo.war\") both available in the
deployment content repository, in which case the deployments would need to have distinct
'name' values but would have the same 'runtime-name'.",
"required" => true,
"min-length" => 1,
"nillable" => false,
"access-type" => "read-only",
"storage" => "configuration"
},
"content" => {
"type" => LIST,
"description" => "List of pieces of content that
comprise the deployment.",
"required" => true,
"min-length" => 1,
"value-type" => {
"input-stream-index" => {
"type" => INT,
"description" => "The index into the
operation's attached input streams of the input stream that contains deployment
content that should be uploaded to the domain's or standalone server's deployment
content repository.",
"required" => false,
"min" => 0,
"nillable" => true
},
"hash" => {
"type" => BYTES,
"description" => "The hash of managed
deployment content that has been uploaded to the domain's or standalone server's
deployment content repository.",
"required" => false,
"min-length" => 20,
"max-length" => 20,
"nillable" => true
},
"bytes" => {
"type" => BYTES,
"description" => "Byte array containing the
deployment content that should uploaded to the domain's or standalone server's
deployment content repository..",
"required" => false,
"min-length" => 1,
"nillable" => true
},
"url" => {
"type" => STRING,
"description" => "The URL at which the
deployment content is available for upload to the domain's or standalone server's
deployment content repository.. Note that the URL must be accessible from the target of
the operation (i.e. the Domain Controller or standalone server).",
"required" => false,
"min-length" => 1,
"nillable" => true
},
"path" => {
"type" => STRING,
"description" => "Path (relative or
absolute) to unmanaged content that is part of the deployment.",
"required" => false,
"min-length" => 1,
"nillable" => false
},
"relative-to" => {
"type" => STRING,
"description" => "Name of a system path to
which the value of the 'path' is relative. If not set, the 'path' is
considered to be absolute.",
"required" => false,
"min-length" => 1,
"nillable" => true
},
"archive" => {
"type" => BOOLEAN,
"description" => "Flag indicating whether
unmanaged content is a zip archive (true) or exploded (false).",
"required" => false
}
},
"access-type" => "read-only",
"storage" => "configuration"
},
...
{noformat}
Compare to read-resource for /extension=\*/subsystem=\*/xml-namespaces attribute. In
this case, value-type is indeed a ModelType (STRING). That's what I expect so I know
how to interpret the list.
{noformat}
/extension=*/:read-resource-description(recursive=true)
{
"outcome" => "success",
"result" => [{
"address" => [("extension" => "*")],
"outcome" => "success",
"result" => {
"description" => "A module that extends the standard
capabilities of a domain or a standalone server.",
"attributes" => {"module" => {
"type" => STRING,
"description" => "The name of the module.",
"expressions-allowed" => false,
"nillable" => false,
"min-length" => 1L,
"max-length" => 2147483647L,
"access-type" => "read-only",
"storage" => "configuration"
}},
"operations" => undefined,
"children" => {"subsystem" => {
"description" => "A subsystem provided by the
extension. What is provided here is information about the xml schema and management
interface provided by the subsystem, not the configuration of the subsystem
itself.",
"model-description" => {"*" => {
"description" => "A subsystem provided by the
extension. What is provided here is information about the xml schema and management
interface provided by the subsystem, not the configuration of the subsystem
itself.",
"attributes" => {
"management-major-version" => {
"type" => INT,
"description" => "Major version of the
subsystem's management interface. May be undefined if the subsystem does not currently
provide a versioned management interface.",
"expressions-allowed" => false,
"nillable" => true,
"access-type" => "read-only",
"storage" => "runtime"
},
"xml-namespaces" => {
"type" => LIST,
"description" => "A list of URIs for the
XML namespaces supported by the subsystem's XML parser. May be empty if the extension
did not clearly associate an XML namespace with a particular subsystem.",
"expressions-allowed" => false,
"nillable" => false,
"value-type" => STRING,
"access-type" => "read-only",
"storage" => "runtime"
},
"management-minor-version" => {
"type" => INT,
"description" => "Minor version of the
subsystem's management interface. May be undefined if the subsystem does not currently
provide a versioned management interface.",
"expressions-allowed" => false,
"nillable" => true,
"access-type" => "read-only",
"storage" => "runtime"
}
},
"operations" => undefined,
"children" => {}
}}
}}
}
}]
}
{noformat}
Because of this, if I try to walk through a read-resource-description on /deployment=*, I
will get an IllegalArgumentException because the value-type is not actually a ModelType.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: