Skip to content

Policy doesn't allow enable_snat to be performed #4

Description

@yangjunsss

Hi, I get a issue when update route table for router,pls help.

Code:

OSClient.OSClientV3 client = authF.auth(region, projectID, userName, password, domain, proxy,debug);
client.networking().router().update(router.toBuilder().route("172.18.0.0/24", lanIPv4Addr).build());

version:

        <dependency>
            <groupId>com.huawei</groupId>
            <artifactId>openstack4j</artifactId>
            <version>3.0.5.1</version>
        </dependency>

HTTP Request

1 > PUT https://vpc.cn-north-1.myhuaweicloud.com/v2.0/routers/b0f9efa7-f43f-43e1-88d1-cd2965356772
1 > Accept: application/json
1 > Content-Type: application/json
1 > User-Agent: OpenStack4j / OpenStack Client
{
"router" : {
"name" : "",
"external_gateway_info" : {
"network_id" : "0a2228f2-7f8a-45f1-8e09-9039e1d09975",
"enable_snat" : false
},
"admin_state_up" : true,
"routes" : [ {
"destination" : "172.18.0.0/24",
"nexthop" : "192.168.0.10"
} ]
}
}

Response:
1 < 403
1 < Accept-Ranges: bytes
1 < Connection: Keep-Alive
1 < Content-Length: 120
1 < Content-Type: application/json
1 < Date: Fri, 03 Aug 2018 08:35:04 GMT
1 < Server: Web Server
1 < Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
1 < via: proxy A
{"NeutronError":{"message":"Policy doesn't allow enable_snat to be performed","type":"PolicyNotAuthorized","detail":""}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions