package com.openshift.metrics.extension;

import org.jboss.as.controller.SimpleAttributeDefinition;
import org.jboss.as.controller.SimpleAttributeDefinitionBuilder;
import org.jboss.as.controller.SimpleResourceDefinition;
import org.jboss.as.controller.registry.AttributeAccess;
import org.jboss.as.controller.registry.ManagementResourceRegistration;
import org.jboss.dmr.ModelType;

public class OpenShiftSubsystemDefinition extends SimpleResourceDefinition {
    public static final OpenShiftSubsystemDefinition INSTANCE = new OpenShiftSubsystemDefinition();

    protected static final SimpleAttributeDefinition METRICS_GROUP =
            new SimpleAttributeDefinitionBuilder(Constants.METRICS_GROUP, ModelType.LIST)
                .setAllowExpression(false)
                .setXmlName(Constants.METRICS_GROUP)
                .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
                .setAllowNull(false)
                .build();

    private OpenShiftSubsystemDefinition() {
        super(OpenShiftSubsystemExtension.SUBSYSTEM_PATH,
                OpenShiftSubsystemExtension.getResourceDescriptionResolver(),
                OpenShiftSubsystemAdd.INSTANCE,
                OpenShiftSubsystemRemove.INSTANCE);
    }

    @Override
    public void registerChildren(ManagementResourceRegistration resourceRegistration) {
        super.registerChildren(resourceRegistration);
        resourceRegistration.registerSubModel(MetricsGroupDefinition.INSTANCE);
    }
}

@@ -76,206 +76,26 @@
 mple
-AttributeDefinition;%0Aimport org.jboss.as.controller.SimpleAttributeDefinitionBuilder;%0Aimport org.jboss.as.controller.SimpleResourceDefinition;%0Aimport org.jboss.as.controller.registry.AttributeAccess
+ResourceDefinition
 ;%0Aim
@@ -167,40 +167,8 @@
 ion;
-%0Aimport org.jboss.dmr.ModelType;
 %0A%0Apu
@@ -242,16 +242,16 @@
 ition %7B%0A
+
     publ
@@ -347,396 +347,8 @@
 );%0A%0A
-    protected static final SimpleAttributeDefinition METRICS_GROUP =%0A            new SimpleAttributeDefinitionBuilder(Constants.METRICS_GROUP, ModelType.LIST)%0A                .setAllowExpression(false)%0A                .setXmlName(Constants.METRICS_GROUP)%0A                .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)%0A                .setAllowNull(false)%0A                .build();%0A%0A
     

Remove unused code