<reponame>bopopescu/nova-token<filename>nova/api/openstack/compute/views/server_tags.py
begin_unit
comment|'# Copyright 2016 Mirantis Inc'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'#    Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'#    not use this file except in compliance with the License. You may obtain'
nl|'\n'
comment|'#    a copy of the License at'
nl|'\n'
comment|'#'
nl|'\n'
comment|'#         http://www.apache.org/licenses/LICENSE-2.0'
nl|'\n'
comment|'#'
nl|'\n'
comment|'#    Unless required by applicable law or agreed to in writing, software'
nl|'\n'
comment|'#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT'
nl|'\n'
comment|'#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the'
nl|'\n'
comment|'#    License for the specific language governing permissions and limitations'
nl|'\n'
comment|'#    under the License.'
nl|'\n'
nl|'\n'
name|'from'
name|'nova'
op|'.'
name|'api'
op|'.'
name|'openstack'
name|'import'
name|'common'
newline|'\n'
name|'from'
name|'nova'
op|'.'
name|'api'
op|'.'
name|'openstack'
op|'.'
name|'compute'
op|'.'
name|'views'
name|'import'
name|'servers'
newline|'\n'
nl|'\n'
nl|'\n'
DECL|class|ViewBuilder
name|'class'
name|'ViewBuilder'
op|'('
name|'common'
op|'.'
name|'ViewBuilder'
op|')'
op|':'
newline|'\n'
DECL|variable|_collection_name
indent|'    '
name|'_collection_name'
op|'='
string|'"tags"'
newline|'\n'
nl|'\n'
DECL|member|__init__
name|'def'
name|'__init__'
op|'('
name|'self'
op|')'
op|':'
newline|'\n'
indent|'        '
name|'super'
op|'('
name|'ViewBuilder'
op|','
name|'self'
op|')'
op|'.'
name|'__init__'
op|'('
op|')'
newline|'\n'
name|'self'
op|'.'
name|'_server_builder'
op|'='
name|'servers'
op|'.'
name|'ViewBuilder'
op|'('
op|')'
newline|'\n'
nl|'\n'
DECL|member|get_location
dedent|''
name|'def'
name|'get_location'
op|'('
name|'self'
op|','
name|'request'
op|','
name|'server_id'
op|','
name|'tag_name'
op|')'
op|':'
newline|'\n'
indent|'        '
name|'server_location'
op|'='
name|'self'
op|'.'
name|'_server_builder'
op|'.'
name|'_get_href_link'
op|'('
nl|'\n'
name|'request'
op|','
name|'server_id'
op|','
string|'"servers"'
op|')'
newline|'\n'
name|'return'
string|'"%s/%s/%s"'
op|'%'
op|'('
name|'server_location'
op|','
name|'self'
op|'.'
name|'_collection_name'
op|','
name|'tag_name'
op|')'
newline|'\n'
dedent|''
dedent|''
endmarker|''
end_unit
