FreeKB - CA Technologies Gateway Migration Utility - Listing active or inactive policies and services (restman)
CA Technologies Gateway Migration Utility - Listing active or inactive policies and services (restman)

Home > Search


This assumes you are familiar with the basic usage of the Gateway Migration Utility that you are using an arguments file with an encoded password to connect to your API Gateway, and that you understand the basic usage of restman to view the XML of a policy or service.

 


List only enabled or disabled policies or services

You are probably already aware that you can view and change the status of a service using the Policy Manager.

 

Likewise, you are also probably familiar with how to spot a disabled policy in the Policy Manager.

 


Enabled services

The -query 'enabled=true' option will return only services that are enabled. 

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/services'
-query 'enabled=true'

 

In the XML, enabled services should have the following.

<l7:Enabled>true</l7:Enabled>

 


Disabled services

The -query 'enabled=false' option will return only services that are disabled.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/services'
-query 'enabled=true'

 

In the XML, disabled services should have the following.

<l7:Enabled>false</l7:Enabled>

 


Policies

I am not aware of an argument that can be used to determine if a policy is enabled or disabled. So, what I do instead is to just display the XML of the policy.

/path/to/GatewayMigrationUtility.sh restman
-argFile example.properties
-method GET
-path '1.0/policies/{policy id}'

 

In the XML, if the policy is enabled, LongValue will be an integer greater than 0.

<l7:LongValue>1</l7:LongValue>

 

In the XML, if the policy is disabled, LongValue will be 0.

<l7:LongValue>0</l7:LongValue>

 

Also, the Comment will be "Policy disabled" and there will be a FalseAssertion value.

<l7:Resource type="policy">
  <wsp:Policy>
    <wsp:All wsp:Usage="Required">
      <L7p:CommentAssertion>
        <L7p:Comment stringValue="Policy disabled"/>
      </L7p:CommentAssertion>
      <L7p:FalseAssertion/>
    </wsp:All>
  </wsp:Policy>
</l7:Resource>

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 54239 in the box below so that we can be sure you are a human.




Comments