Layer7 API Management

  • 1.  service is resolved but the corresponding policy is invalid for service GOID

    Posted Aug 10, 2017 10:05 AM

    Hello,

     

    I have the same problem as Rajesh two years ago : https://communities.ca.com/thread/241733922# but i don't understand how to resolv it.

    I'm trying to export policies from API Gateway 8.3 to 9.2 and i got this issue for all my services.

     

    If someone could explain me what i should do, it would be a pleasure

     

    Thibault



  • 2.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Broadcom Employee
    Posted Aug 10, 2017 02:34 PM

    Thibault,

     

    The best thing to look at is the ssm log located in the .l7tech home directory where the Policy Manager is being run from along with the ssg log from the gateway. If you gather these at the time of the error being presented we can probably determine why the import is failing.

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 3.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Broadcom Employee
    Posted Aug 10, 2017 09:51 PM

    Dear ThibaultLECOQ82350795 ,

    Did you restart gateway after import the policies? It could be due to the (dependent) assertion is not loaded to memory yet.

    (It might also be due to you delete the dependent policy/fragment/assertion ... )

     

    Regards,

    Mark



  • 4.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Posted Aug 16, 2017 04:05 AM

    Just to be sur, policy = fragment ? And policy != service ?

     

    I found the problem. The fact is that I import services and fragments separatly so fragments are unknow for services. 

     

    I export services with the API like this : /restman/1.0/services?name="mypolicy", that return me an XML.

    Then I import it with the API : /restman/1.0/services with the XML in the body

     

    I got no error but this only import service (not fragments like manually). Is there a way to import services and fragment with the API with one XML ? Cause I tried to import fragment separatly but I don't know how to link framgent ID with my service.



  • 5.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Broadcom Employee
    Posted Aug 16, 2017 07:49 PM

    I would look to use the bundle functionality in the restman service to pull out services and its dependencies including policy fragments. Example command: https://<gateway IP/FQDN>:8443/restman/1.0/bundle?service=6c1b81e762c78580648fdf66f8b516dd 

     

    Review the built in document for migrations to help further: https://<gateway IP/FQDN>:8443/restman/1.0/doc/migration.html 

     

    Sincerely,

     

    Stephen Hughes

    Director, CA Support



  • 6.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Posted Aug 17, 2017 11:14 AM

    As stated in the documentation : To import a bundle send a PUT request with the same bundle XML to https://<gateway>:8443/restman/1.0/bundle.

    So I started to export all the entities with this request : https://<gateway>:8443/restman/1.0/bundle?all=true

    Then I tried to import the XML (on a fresh install) but I must add  'xmlns:l7="htpp://ns.l7tech.com/2010/04/gateway-management' in the first element (l7:Bundle) to run the PUT request.

    After that I got a 409 Conflict and many ErrorMessage like : 'Could not locate entity ... id=*** ...' but that entity is in the XML with the same id.

    I don't know what i missed.



  • 7.  Re: service is resolved but the corresponding policy is invalid for service GOID

    Broadcom Employee
    Posted Aug 24, 2017 04:53 PM

    You may want to look into using GMU tool to help with the import/export and making sure all dependencies are being grabbed. It will essentially perform a similar command to what you had attempted with Restman and the /bundle URI, but assist you in the migration process more than Restman does. It does require a specific command structure so reccomend looking at the Wiki page below on common migration use cases and the command help sections for migrateOut and migrateIn.

     

    Below is a link to get started with the tool and should be available for download via Product Downloads on Support website.

    Gateway Migration - CA API Gateway - 9.2 - CA Technologies Documentation