Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

AS3 declaration

Anthony_Pineda
Nimbostratus
Nimbostratus

In all the example declarations I've seen so far, it lists the virtual server name as serviceMain and if I deviate from that by giving it my own virtual server name like testme123.example.com-80 it complains about not using serviceMain. How can we supply a different VS name on an AS3 declaration?

 

Here is the error message. I used a Python get request to send the declaration. I'm using a Simple HTTP AS3 declaration.

 

('Status Code:', 422, '\n', u'{"code":422,"errors":["/Sample_01/A1: should have required property \'serviceMain\'"],"declarationFullId":"","message":"declaration is invalid"}')

 

 

 

1 ACCEPTED SOLUTION

suttonsc
F5 Employee
F5 Employee

I believe this has to do with the template type you are using.

 

Try to change the template from http to generic and then change the serviceMain to testme123.example.com-80.

 

When using the 'http' template I can get the same error:

"Sample_01": { "class": "Tenant", "testme123.example.com-80": { "class": "Application", "template": "http", <<<<<<<< Change to generic "serviceMain": { "class": "Service_HTTP", "virtualAddresses": [ "10.0.1.11" ],

 

 

Altered the template type to generic and it deployed the virtual server with the matching name:

"Sample_01": { "class": "Tenant", "testme123.example.com-80": { "class": "Application", "template": "generic", "testme123.example.com-80": { "class": "Service_HTTP", "virtualAddresses": [ "10.0.1.11" ],

 

View solution in original post

2 REPLIES 2

suttonsc
F5 Employee
F5 Employee

I believe this has to do with the template type you are using.

 

Try to change the template from http to generic and then change the serviceMain to testme123.example.com-80.

 

When using the 'http' template I can get the same error:

"Sample_01": { "class": "Tenant", "testme123.example.com-80": { "class": "Application", "template": "http", <<<<<<<< Change to generic "serviceMain": { "class": "Service_HTTP", "virtualAddresses": [ "10.0.1.11" ],

 

 

Altered the template type to generic and it deployed the virtual server with the matching name:

"Sample_01": { "class": "Tenant", "testme123.example.com-80": { "class": "Application", "template": "generic", "testme123.example.com-80": { "class": "Service_HTTP", "virtualAddresses": [ "10.0.1.11" ],

 

Anthony_Pineda
Nimbostratus
Nimbostratus

Thank you very much! I tried the small change above and it works. There wasn't a lot of information on the documentation about doing it this way. I figured it's absolute nuts to see all your virtual servers named serviceMain. Do you have a sample template of the full declaration for a generic virtual server. I figure we would want to change some of the profiles like TCP protocol, etc.