Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discarding the master and slave words #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
# The encoding of source files.
#source_encoding = 'utf-8'

# The master toctree document.
master_doc = 'index'
# The main toctree document.
main_doc = 'index'

# General information about the project.
project = u'nova'
Expand Down
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/extended_ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _extend_server(self, context, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedIpsServerTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -59,7 +59,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedIpsServersTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -96,7 +96,7 @@ def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_ips.alias: Extended_ips.namespace})


Expand All @@ -105,5 +105,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_ips.alias: Extended_ips.namespace})
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/extended_ips_mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def _extend_server(self, context, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedIpsMacServerTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -61,7 +61,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedIpsMacServersTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -97,7 +97,7 @@ class ExtendedIpsMacServerTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_ips_mac.alias: Extended_ips_mac.namespace})


Expand All @@ -106,5 +106,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_ips_mac.alias: Extended_ips_mac.namespace})
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _extend_server(self, context, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedServerAttributeTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -51,7 +51,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedServerAttributesTemplate())

servers = list(resp_obj.obj['servers'])
Expand Down Expand Up @@ -92,7 +92,7 @@ def construct(self):
make_server(root)
alias = Extended_server_attributes.alias
namespace = Extended_server_attributes.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})


class ExtendedServerAttributesTemplate(xmlutil.TemplateBuilder):
Expand All @@ -102,4 +102,4 @@ def construct(self):
make_server(elem)
alias = Extended_server_attributes.alias
namespace = Extended_server_attributes.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/extended_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _extend_server(self, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedStatusTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -48,7 +48,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedStatusesTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -86,7 +86,7 @@ class ExtendedStatusTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_status.alias: Extended_status.namespace})


Expand All @@ -95,5 +95,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_status.alias: Extended_status.namespace})
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def construct(self):
elem = xmlutil.SubTemplateElement(root, 'virtual_interface',
selector='virtual_interfaces')
make_vif(elem)
return xmlutil.SlaveTemplate(root, 1,
return xmlutil.SubordinateTemplate(root, 1,
nsmap={Extended_virtual_interfaces_net.alias:
Extended_virtual_interfaces_net.namespace})

Expand All @@ -50,7 +50,7 @@ def index(self, req, resp_obj, server_id):
key = "%s:net_id" % Extended_virtual_interfaces_net.alias
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedVirtualInterfaceNetTemplate())
for vif in resp_obj.obj['virtual_interfaces']:
vif1 = self.network_api.get_vif_by_mac_address(context,
Expand Down
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/extended_volumes.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _extend_server(self, context, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedVolumesServerTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -51,7 +51,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedVolumesServersTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -90,7 +90,7 @@ class ExtendedVolumesServerTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_volumes.alias: Extended_volumes.namespace})


Expand All @@ -99,5 +99,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Extended_volumes.alias: Extended_volumes.namespace})
12 changes: 6 additions & 6 deletions nova/api/openstack/compute/contrib/flavor_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def construct(self):
make_flavor(root)
alias = Flavor_access.alias
namespace = Flavor_access.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})


class FlavorsTemplate(xmlutil.TemplateBuilder):
Expand All @@ -56,7 +56,7 @@ def construct(self):
make_flavor(elem)
alias = Flavor_access.alias
namespace = Flavor_access.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})


class FlavorAccessTemplate(xmlutil.TemplateBuilder):
Expand All @@ -65,7 +65,7 @@ def construct(self):
elem = xmlutil.SubTemplateElement(root, 'access',
selector='flavor_access')
make_flavor_access(elem)
return xmlutil.MasterTemplate(root, 1)
return xmlutil.MainTemplate(root, 1)


def _marshall_flavor_access(flavor_id):
Expand Down Expand Up @@ -134,7 +134,7 @@ def _extend_flavor(self, flavor_rval, flavor_ref):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=FlavorTemplate())
db_flavor = req.get_db_flavor(id)

Expand All @@ -144,7 +144,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=FlavorsTemplate())

flavors = list(resp_obj.obj['flavors'])
Expand All @@ -156,7 +156,7 @@ def detail(self, req, resp_obj):
def create(self, req, body, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=FlavorTemplate())

db_flavor = req.get_db_flavor(resp_obj.obj['flavor']['id'])
Expand Down
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/image_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ def construct(self):
root = xmlutil.TemplateElement('images')
elem = xmlutil.SubTemplateElement(root, 'image', selector='images')
make_image(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Image_size.alias: Image_size.namespace})


class ImageSizeTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('image', selector='image')
make_image(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Image_size.alias: Image_size.namespace})


Expand All @@ -51,7 +51,7 @@ def _extend_image(self, image, image_cache):
def show(self, req, resp_obj, id):
context = req.environ["nova.context"]
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ImageSizeTemplate())
image_resp = resp_obj.obj['image']
# image guaranteed to be in the cache due to the core API adding
Expand All @@ -63,7 +63,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ImagesSizeTemplate())
images_resp = list(resp_obj.obj['images'])
# images guaranteed to be in the cache due to the core API adding
Expand Down
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/contrib/server_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _extend_server(self, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ServerUsageTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -53,7 +53,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ServerUsagesTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -89,7 +89,7 @@ class ServerUsageTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Server_usage.alias: Server_usage.namespace})


Expand All @@ -98,5 +98,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
Server_usage.alias: Server_usage.namespace})
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def _extend_server(self, context, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedServerAttributeTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -51,7 +51,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedServerAttributesTemplate())

servers = list(resp_obj.obj['servers'])
Expand Down Expand Up @@ -95,7 +95,7 @@ def construct(self):
make_server(root)
alias = ExtendedServerAttributes.alias
namespace = ExtendedServerAttributes.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})


class ExtendedServerAttributesTemplate(xmlutil.TemplateBuilder):
Expand All @@ -105,4 +105,4 @@ def construct(self):
make_server(elem)
alias = ExtendedServerAttributes.alias
namespace = ExtendedServerAttributes.namespace
return xmlutil.SlaveTemplate(root, 1, nsmap={alias: namespace})
return xmlutil.SubordinateTemplate(root, 1, nsmap={alias: namespace})
8 changes: 4 additions & 4 deletions nova/api/openstack/compute/plugins/v3/extended_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _extend_server(self, server, instance):
def show(self, req, resp_obj, id):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedStatusTemplate())
server = resp_obj.obj['server']
db_instance = req.get_db_instance(server['id'])
Expand All @@ -49,7 +49,7 @@ def show(self, req, resp_obj, id):
def detail(self, req, resp_obj):
context = req.environ['nova.context']
if authorize(context):
# Attach our slave template to the response object
# Attach our subordinate template to the response object
resp_obj.attach(xml=ExtendedStatusesTemplate())
servers = list(resp_obj.obj['servers'])
for server in servers:
Expand Down Expand Up @@ -92,7 +92,7 @@ class ExtendedStatusTemplate(xmlutil.TemplateBuilder):
def construct(self):
root = xmlutil.TemplateElement('server', selector='server')
make_server(root)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
ExtendedStatus.alias: ExtendedStatus.namespace})


Expand All @@ -101,5 +101,5 @@ def construct(self):
root = xmlutil.TemplateElement('servers')
elem = xmlutil.SubTemplateElement(root, 'server', selector='servers')
make_server(elem)
return xmlutil.SlaveTemplate(root, 1, nsmap={
return xmlutil.SubordinateTemplate(root, 1, nsmap={
ExtendedStatus.alias: ExtendedStatus.namespace})
Loading