NetworkServiceImpl does not need a cache of system network offerings
Ensure mocks build to new APIs.
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
- remove unused public apis
- remove unused members
- change visibility of methods to protected if they do not implement a method in the interface
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
Remove usage and impl as adapter.
We have duplicate code that generates apiname:cmd class maps which is
unavoidable right now as:
- Plugin should not depend on ApiServer or any other component
- cloud-utils cannot depend on cloud-api for the APICommand annotation
- Use java reflect to create a static method in cloud-utils that does the job
would be unsafe.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Author: Likitha Shetty <likitha.shetty@citrix.com>
Date: Wed Jan 9 11:54:25 2013 +0530
CLOUDSTACK-614: ListTemplates API is not returning "Enable SSH Key" attribute for any given template. Update the TemplateResponse by adding 'sshkeyenabled' attribute to it. This attribute is set to the value that the user passes as input for parameter 'sshkeyenabled' while registering the template.
Signed-off-by: Min Chen <min.chen@citrix.com>
- This was removed part of the response work
- Re-adding as this kind of method definition is available in several other
exception classes and is used in a lot of cmd classes and in service layer
- TODO: We need to find a way to replace old code and refactor method with the
new definition that gets only uuid.
- FIXME: Some tables don't have uuid for ex. ClusterVSMMapVO, in this case
we should keep the method until we find a way to fix this issue
Partially reverting a88ce6bb7f495dddeb954d1fc7826176646b3590
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
- Introduces api/discovery plugin that helps discover apis on the mgmt server
- It's a pluggable service, therefore has it's own api-discovery_commands.properties
where the discovery api, listApi can be blacklisted (by removing it), or it's
role mask can be changed
- By default its response has all the apis
- Changes in other parts of the code to make it work, viz. components.xml, pom.xml,
and in ApiServer where it is used as an adapter to get apiname, cmd mappings
The ApiDiscoveryService interface is a contract that the implementing class will
provide:
1. A means to get all the apis as a list of response, plugin is free to implement
the response class, as long as it extends on the BaseResponse:
ListResponse<? extends BaseResponse> listApis();
2. Provides a map of apiname as the key and cmd class as the value:
Map<String, Class<?>> getApiNameCmdClassMapping();
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
WIP : move stuff between network manager and network service.
at this point there is about 700 lines of duplicated code
WIP: Leave creation of default offerings to NetworkManager init
WIP: clean up imports
Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
For LB device in inline mode, the ip deployer(the owner of public ip) is the
firewall in front of it, not itself. So check if it's inline or not, if it's
inline, return the firewall as ip deployer
Use SRX firewall filter as SRX firewall. The old security policy mechanism
cannot be used as IP based. This would enable SRX's ability to control traffic
for F5 behind it.
Two apis, copyIso and copyTemplate point to the same Cmd class, the commit adds
the child class CopyIsoCmd that extends on CopyTemplateCmd. This just serves as
the boilerplate class. Every api cmd name maps 1:1 to a cmd class.
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
- Reads and fills name field of all cmd class and api name mapping from
commands.properties.in
- Automation using following python script ensures correctness of the change
import os
file_prefix = "api/src/"
search_pattern = "@APICommand("
pattern_len = len(search_pattern)
prop_file = "client/tomcatconf/commands.properties.in"
f = open(prop_file, 'r')
data = f.read()
f.close()
apis = filter(lambda x: x.strip()!='' and (not x.startswith('#')), data.split('\n'))
for api in apis:
api_name = api.split('=')[0]
cmd_name = file_prefix + api.split('=')[1].split(';')[0].replace('.', '/').strip() + ".java"
if not os.path.exists(cmd_name):
print cmd_name, api_name
f = open(cmd_name, 'r')
d = f.read()
f.close()
idx = d.find(search_pattern) + pattern_len
new_str = d[:idx] + "name = \"%s\", " % api_name + d[idx:]
f = open(cmd_name, 'w')
f.write(new_str)
f.close()
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
Entities correlated to the Identity and carry a uuid and those
correlated to InternalIdentity carry an id. Those entities that carry
both will correlated to Identity and InternalIdentity.
This refactors entities wherever possible to ensure the VO only
implements the first class entity.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>