Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1908

Tab completion suggest writing attribute which has access type metric and is not writable

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.0.0.Alpha12
    • 3.0.0.Alpha11
    • CLI
    • None
    • Hide

      Start EAP in standalone-full-ha profile

       sh standalone.sh -c standalone-full-ha.xml 

      Connect with CLI and navigate to jms-queue on messaging subsystem

       cd subsystem=messaging-activemq/server=default/jms-queue=DLQ
      

      Try to write attribute and as a name, attributes of type metric are also suggested.

       :write-attribute(name=
      consumer-count  delivering-count  entries  legacy-entries  message-count  messages-added  scheduled-count  
      
      Show
      Start EAP in standalone-full-ha profile sh standalone.sh -c standalone-full-ha.xml Connect with CLI and navigate to jms-queue on messaging subsystem cd subsystem=messaging-activemq/server= default /jms-queue=DLQ Try to write attribute and as a name, attributes of type metric are also suggested. :write-attribute(name= consumer-count delivering-count entries legacy-entries message-count messages-added scheduled-count

      CLI tab completion suggests attributes that are not writable and their access-type is metric
      Example

      /subsystem=messaging-activemq/server=default/jms-queue=DLQ:write-attribute(name=<TAB>
      consumer-count  delivering-count  entries  legacy-entries  message-count  messages-added  scheduled-count  
      

      From executing :read-resource-description we can see, attributes consumer-count, delivering-count, message-count, messages-added, scheduled-count are of type metric.

      On attempt to write metric attribute, for example message-count, non writable error is printed

      [standalone@localhost:9990 jms-queue=q] :write-attribute(name=message-count, value=5)
      {
          "outcome" => "failed",
          "failure-description" => "WFLYCTL0048: Attribute message-count is not writable",
          "rolled-back" => true
      }
      

      CLI should not suggest writing attributes that are not writable.

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: