F5Networks / f5-appsvcs-extension

F5 BIG-IP Application Services 3 Extension
Apache License 2.0
164 stars 53 forks source link

AS3 Datagroup ExternalFilePath URL doesn't work #663

Open vaclavnep opened 1 year ago

vaclavnep commented 1 year ago

Environment

Summary

Upload content of Datagroup object from DevOps GIT repository in Azure to a BIGIP by AS3 extension. This objects should be imported into tenant Common/Shared.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Submit the following declaration:

    {
    "schemaVersion": "3.39.0",
    "class": "ADC",
            "Common": {
            "class": "Tenant",
            "Shared": {
                "class": "Application",
                "template": "shared",
                "dg-test": {
                    "class": "Data_Group",
                    "remark": "testing Datagroup",
                    "storageType": "external",
                    "keyDataType": "string",
                    "separator": ":=",
                    "externalFilePath": {
                        "url": "https://dev.azure.com/xxxxx/F5/_apis/sourceProviders/tfsgit/filecontents?path=/Datagroups/datagroups/dg-test&repository=as3-shared-resources&commitOrBranch=master",
                        "authentication":{
                            "method": "bearer-token",                          
                            "token":"myTokenexample123"
                        }                    
                    }   
                }
            }
        }
    }
  2. Observe the following error response:

    {
    "code": 422,
    "declarationFullId": "",
    "message": "Could not reach https://dev.azure.com/xxxxx/F5/_apis/sourceProviders/tfsgit/filecontents?path=/Datagroups/datagroups/dg-test&repository=as3-shared-resources&commitOrBranch=master for /Common/Shared/dg-test/externalFilePath"
    }

The content of the file (defined by URL-authenticated by Bearer token) should be imported into a new DG object in /Common/Shared tenant. Similar way I have created the content upload of iRules which are imported from the DevOps repository to BIGIPs too. It is working properly by the URL option.

Actual Behavior

When I tried to reach the file content by POSTMAN and use the same URL and bearer token (like in AS3ext definition) then the content of DG is retrieved properly. Could you please advise if the notation of ExternalFilePath option is OK ?

sunitharonan commented 1 year ago

Thank you @vaclavnep. I have added this issue to our internal product backlog as AUTOTOOL-3573. In order to prioritize and understand the issue better, please reach out to us at automation_toolchain_pm@f5.com

mdditt2000 commented 1 year ago

@vaclavnep this issue should be resolved in https://github.com/F5Networks/f5-appsvcs-extension/issues/586

Unable to create "Data_Group" using "externalFilePath": Failed! exit_code (22)

If not please let us know ASAP. Thanks!

vaclavnep commented 1 year ago

Hello Mark,

Yes it is very similar case but we are using AS3 version 3.39 where the fix should be included.

{

"schemaVersion": "3.39.0",

"class": "ADC",

        "Common": {

        "class": "Tenant",

Best regards

Vaclav

From: mark dittmer @.> Sent: úterý 6. prosince 2022 19:36 To: F5Networks/f5-appsvcs-extension @.> Cc: vaclavnep @.>; Mention @.> Subject: Re: [F5Networks/f5-appsvcs-extension] AS3 Datagroup ExternalFilePath URL doesn't work (Issue #663)

@vaclavnep https://github.com/vaclavnep this issue should be resolved in

586 https://github.com/F5Networks/f5-appsvcs-extension/issues/586

Unable to create "Data_Group" using "externalFilePath": Failed! exit_code (22)

If not please let us know ASAP. Thanks!

— Reply to this email directly, view it on GitHub https://github.com/F5Networks/f5-appsvcs-extension/issues/663#issuecomment- 1339806365 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AJO5UEVSYRGJGU7B3HNZUC3WL 6BQFANCNFSM6AAAAAASAWWYGU . You are receiving this because you were mentioned.Message ID: @. @.> >